← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 252 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  3. 3.🌈 Which colour of light is strongest in rgb(135, 221, 59)? (a) blue (b) green (c) red
  4. 4.🌈 Which colour of light is strongest in rgb(107, 197, 107)? (a) blue (b) red (c) green
  5. 5.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) blue (d) yellow
  6. 6.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) yellow (d) black
  7. 7.🌈 In #640000 the red part is the hex number 64. What is it as a normal number?
  8. 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  9. 9.🌈 Which colour is #ffff00? (a) yellow (b) black (c) bright green (d) white
  10. 10.🌈 Which colour of light is strongest in rgb(177, 117, 133)? (a) red (b) blue (c) green
  11. 11.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(51, 37, 170)? (a) red (b) blue (c) green
  13. 13.🌈 Which colour of light is strongest in rgb(75, 27, 188)? (a) red (b) green (c) blue
  14. 14.🌈 In #0000ee the blue part is the hex number ee. What is it as a normal number?
  15. 15.🌈 Which colour is #ffffff? (a) yellow (b) white (c) bright green (d) cyan
  16. 16.🌈 Which colour is #00ff00? (a) bright green (b) black (c) red (d) cyan
  17. 17.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  18. 18.🌈 In #e80000 the red part is the hex number e8. What is it as a normal number?
  19. 19.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) white (d) red
  20. 20.🌈 Which colour of light is strongest in rgb(228, 92, 52)? (a) red (b) blue (c) green
  21. 21.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) black (c) red (d) cyan
  22. 22.🌈 Which colour is #00ffff? (a) cyan (b) red (c) bright green (d) blue
  23. 23.🌈 In #000014 the blue part is the hex number 14. What is it as a normal number?
  24. 24.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
  25. 25.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
  26. 26.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
  27. 27.🌈 In #3c0000 the red part is the hex number 3c. What is it as a normal number?
  28. 28.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  29. 29.🌈 Which colour of light is strongest in rgb(179, 140, 134)? (a) red (b) green (c) blue
  30. 30.🌈 Which colour of light is strongest in rgb(244, 22, 38)? (a) red (b) blue (c) green
  31. 31.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  32. 32.🌈 In #00ad00 the green part is the hex number ad. What is it as a normal number?
  33. 33.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) bright green (d) black
  34. 34.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) cyan (d) red
  35. 35.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) black (c) magenta (d) white
  36. 36.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #00ffff
  37. 37.🌈 In #00b700 the green part is the hex number b7. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(221, 91, 63)? (a) green (b) blue (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(90, 166, 49)? (a) blue (b) green (c) red
  40. 40.🌈 In #000041 the blue part is the hex number 41. What is it as a normal number?

Answer key

  1. F
  2. red
  3. green
  4. green
  5. bright green
  6. red
  7. 100
  8. 3
  9. yellow
  10. red
  11. 36
  12. blue
  13. blue
  14. 238
  15. white
  16. bright green
  17. 241
  18. 232
  19. magenta
  20. red
  21. cyan
  22. cyan
  23. 20
  24. 141
  25. 99
  26. 55
  27. 60
  28. 255
  29. red
  30. red
  31. blue
  32. 173
  33. blue
  34. yellow
  35. magenta
  36. #0000ff
  37. 183
  38. red
  39. green
  40. 65

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