← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 40 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  2. 2.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) blue (d) magenta
  3. 3.🌈 Which colour is #0000ff? (a) yellow (b) white (c) red (d) blue
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  5. 5.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) blue (c) cyan (d) red
  6. 6.🌈 In #000038 the blue part is the hex number 38. What is it as a normal number?
  7. 7.🌈 Which colour of light is strongest in rgb(36, 4, 230)? (a) green (b) red (c) blue
  8. 8.🌈 Which hex code is magenta? (a) #00ff00 (b) #ffff00 (c) #ff00ff (d) #ff0000
  9. 9.🌈 Which colour of light is strongest in rgb(177, 8, 135)? (a) blue (b) green (c) red
  10. 10.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) magenta (c) white (d) bright green
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  12. 12.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) white (d) red
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  14. 14.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) black (c) magenta (d) white
  16. 16.🌈 In #003900 the green part is the hex number 39. What is it as a normal number?
  17. 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  18. 18.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #ffffff
  19. 19.🌈 Which hex code is blue? (a) #ffffff (b) #000000 (c) #0000ff (d) #ffff00
  20. 20.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) blue (c) yellow (d) white
  21. 21.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
  22. 22.🌈 Which colour is #000000? (a) black (b) yellow (c) white (d) cyan
  23. 23.🌈 Which colour of light is strongest in rgb(166, 140, 65)? (a) red (b) blue (c) green
  24. 24.🌈 Which colour of light is strongest in rgb(177, 102, 65)? (a) green (b) red (c) blue
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) bright green (c) blue (d) cyan
  26. 26.🌈 Which hex code is white? (a) #ff0000 (b) #0000ff (c) #ffffff (d) #00ff00
  27. 27.🌈 Which colour is #ff00ff? (a) black (b) red (c) bright green (d) magenta
  28. 28.🌈 Which colour of light is strongest in rgb(174, 80, 127)? (a) green (b) red (c) blue
  29. 29.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(185, 133, 139)? (a) blue (b) red (c) green
  31. 31.🌈 Which colour of light is strongest in rgb(3, 128, 199)? (a) red (b) green (c) blue
  32. 32.🌈 Which colour is #00ff00? (a) yellow (b) red (c) blue (d) bright green
  33. 33.🌈 Which colour of light is strongest in rgb(153, 134, 138)? (a) green (b) red (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(252, 53, 38)? (a) green (b) blue (c) red
  35. 35.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
  36. 36.🌈 In #00003b the blue part is the hex number 3b. What is it as a normal number?
  37. 37.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(112, 32, 187)? (a) green (b) red (c) blue
  39. 39.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  40. 40.🌈 In #00000a the blue part is the hex number 0a. What is it as a normal number?

Answer key

  1. 3
  2. blue
  3. blue
  4. 255
  5. red
  6. 56
  7. blue
  8. #ff00ff
  9. red
  10. bright green
  11. blue
  12. cyan
  13. red
  14. 16
  15. white
  16. 57
  17. F
  18. #ffff00
  19. #0000ff
  20. yellow
  21. 129
  22. black
  23. red
  24. red
  25. cyan
  26. #ffffff
  27. magenta
  28. red
  29. 146
  30. red
  31. blue
  32. bright green
  33. red
  34. red
  35. 178
  36. 59
  37. 11
  38. blue
  39. 132
  40. 10

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