← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 319 · 40 questions
TalentJR

Code tip (Red, green, blue): rgb(red, green, blue): each from 0 to 255. #rrggbb: the same three numbers in hex. Hex digits: 0–9, then a = 10, b = 11, c = 12, d = 13, e = 14, f = 15. A pair = 16 × first digit + second digit: ff = 16 × 15 + 15 = 255.

NameDateTime takenScore ___ / 40
  1. 1.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #00ffff
  2. 2.🌈 Which colour is #0000ff? (a) cyan (b) white (c) blue (d) yellow
  3. 3.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
  4. 4.🌈 Which colour of light is strongest in rgb(111, 194, 6)? (a) blue (b) green (c) red
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  6. 6.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
  7. 7.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ffff00 (d) #00ffff
  8. 8.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
  9. 9.🌈 Which colour is #ffff00? (a) bright green (b) yellow (c) cyan (d) blue
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  12. 12.🌈 In #00f800 the green part is the hex number f8. What is it as a normal number?
  13. 13.🌈 Which colour is #000000? (a) magenta (b) black (c) blue (d) bright green
  14. 14.🌈 Which colour of light is strongest in rgb(166, 36, 25)? (a) blue (b) red (c) green
  15. 15.🌈 Which colour of light is strongest in rgb(9, 181, 135)? (a) blue (b) red (c) green
  16. 16.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
  17. 17.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
  18. 18.🌈 Which colour is #00ffff? (a) yellow (b) blue (c) cyan (d) white
  19. 19.🌈 In #000034 the blue part is the hex number 34. What is it as a normal number?
  20. 20.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #0000ff
  21. 21.🌈 Which colour is #ffffff? (a) cyan (b) white (c) blue (d) bright green
  22. 22.🌈 Which hex code is white? (a) #00ff00 (b) #ffff00 (c) #ffffff (d) #ff00ff
  23. 23.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  24. 24.🌈 Which colour of light is strongest in rgb(104, 129, 169)? (a) green (b) red (c) blue
  25. 25.🌈 In #8e0000 the red part is the hex number 8e. What is it as a normal number?
  26. 26.🌈 In #fd0000 the red part is the hex number fd. What is it as a normal number?
  27. 27.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ff00 (c) #00ffff (d) #ff0000
  28. 28.🌈 Which colour of light is strongest in rgb(252, 96, 23)? (a) red (b) green (c) blue
  29. 29.🌈 In #0000e6 the blue part is the hex number e6. What is it as a normal number?
  30. 30.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  31. 31.🌈 Which colour of light is strongest in rgb(61, 26, 152)? (a) blue (b) red (c) green
  32. 32.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
  33. 33.🌈 Which hex code is magenta? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #00ff00
  34. 34.🌈 In #00a000 the green part is the hex number a0. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) magenta (c) white (d) red
  36. 36.🌈 Which colour of light is strongest in rgb(25, 170, 117)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(159, 86, 71)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour is #ff0000? (a) black (b) bright green (c) red (d) yellow
  39. 39.🌈 Which colour of light is strongest in rgb(246, 25, 79)? (a) green (b) red (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(110, 11, 180)? (a) red (b) green (c) blue

Answer key

  1. #ffff00
  2. blue
  3. 65
  4. green
  5. 3
  6. 86
  7. #00ff00
  8. 3
  9. yellow
  10. blue
  11. red
  12. 248
  13. black
  14. red
  15. green
  16. 222
  17. 210
  18. cyan
  19. 52
  20. #0000ff
  21. white
  22. #ffffff
  23. 255
  24. blue
  25. 142
  26. 253
  27. #00ffff
  28. red
  29. 230
  30. F
  31. blue
  32. 235
  33. #ff00ff
  34. 160
  35. red
  36. green
  37. red
  38. red
  39. red
  40. blue

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids