← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 15 · 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 colour of light is strongest in rgb(42, 226, 126)? (a) red (b) green (c) blue
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  3. 3.🌈 Which colour is #ffffff? (a) bright green (b) red (c) white (d) yellow
  4. 4.🌈 Which colour of light is strongest in rgb(175, 14, 92)? (a) green (b) red (c) blue
  5. 5.🌈 In #00bb00 the green part is the hex number bb. What is it as a normal number?
  6. 6.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #ff00ff
  7. 7.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) cyan (d) white
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  9. 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  10. 10.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
  11. 11.🌈 Which colour of light is strongest in rgb(172, 116, 106)? (a) blue (b) green (c) red
  12. 12.🌈 Which colour of light is strongest in rgb(227, 88, 23)? (a) green (b) red (c) blue
  13. 13.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) white (c) bright green (d) black
  15. 15.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) yellow (d) white
  16. 16.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) white (d) bright green
  17. 17.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) red (d) blue
  18. 18.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) cyan (c) black (d) white
  19. 19.🌈 Which colour is #ffff00? (a) red (b) black (c) yellow (d) bright green
  20. 20.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
  21. 21.🌈 Which hex code is black? (a) #00ff00 (b) #ffffff (c) #000000 (d) #0000ff
  22. 22.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  23. 23.🌈 Which colour is #000000? (a) black (b) white (c) blue (d) red
  24. 24.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) black (d) white
  26. 26.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(17, 155, 54)? (a) blue (b) red (c) green
  28. 28.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  29. 29.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) white (c) black (d) blue
  31. 31.🌈 Which colour is #0000ff? (a) red (b) cyan (c) blue (d) magenta
  32. 32.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
  33. 33.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #0000ff
  34. 34.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
  35. 35.🌈 In #f00000 the red part is the hex number f0. What is it as a normal number?
  36. 36.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff0000
  37. 37.🌈 Which colour of light is strongest in rgb(151, 86, 136)? (a) green (b) blue (c) red
  38. 38.🌈 Which colour of light is strongest in rgb(228, 65, 8)? (a) blue (b) red (c) green
  39. 39.🌈 In #001700 the green part is the hex number 17. What is it as a normal number?
  40. 40.🌈 Which colour is #ff0000? (a) red (b) cyan (c) black (d) yellow

Answer key

  1. green
  2. F
  3. white
  4. red
  5. 187
  6. #0000ff
  7. magenta
  8. red
  9. 3
  10. 37
  11. red
  12. red
  13. 146
  14. bright green
  15. red
  16. magenta
  17. yellow
  18. white
  19. yellow
  20. 55
  21. #000000
  22. blue
  23. black
  24. 229
  25. black
  26. 98
  27. green
  28. 255
  29. 24
  30. blue
  31. blue
  32. 115
  33. #00ff00
  34. 197
  35. 240
  36. #ffffff
  37. red
  38. red
  39. 23
  40. red

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