← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 37 · 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.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  2. 2.🌈 In #006400 the green part is the hex number 64. What is it as a normal number?
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) black (d) yellow
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  5. 5.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) blue (d) bright green
  6. 6.🌈 Which colour of light is strongest in rgb(66, 203, 109)? (a) blue (b) green (c) red
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  8. 8.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) blue (c) red (d) yellow
  9. 9.🌈 Which colour is #ff00ff? (a) yellow (b) magenta (c) black (d) bright green
  10. 10.🌈 Which hex code is yellow? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #ffff00
  11. 11.🌈 Which colour is #ffff00? (a) red (b) bright green (c) white (d) yellow
  12. 12.🌈 Which colour of light is strongest in rgb(197, 108, 15)? (a) green (b) blue (c) red
  13. 13.🌈 Which hex code is blue? (a) #000000 (b) #ff00ff (c) #0000ff (d) #ffff00
  14. 14.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #0000ff
  15. 15.🌈 Which hex code is white? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #ff0000
  16. 16.🌈 Which colour is #ff0000? (a) yellow (b) bright green (c) black (d) red
  17. 17.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
  18. 18.🌈 Which hex code is bright green? (a) #ffffff (b) #00ffff (c) #000000 (d) #00ff00
  19. 19.🌈 Which colour of light is strongest in rgb(250, 68, 138)? (a) green (b) blue (c) red
  20. 20.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
  21. 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  22. 22.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) bright green (c) blue (d) cyan
  23. 23.🌈 Which colour of light is strongest in rgb(196, 24, 55)? (a) blue (b) green (c) red
  24. 24.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) red (d) bright green
  26. 26.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) red (d) black
  27. 27.🌈 Which colour of light is strongest in rgb(13, 181, 82)? (a) red (b) blue (c) green
  28. 28.🌈 In #880000 the red part is the hex number 88. What is it as a normal number?
  29. 29.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  30. 30.🌈 Which colour is #00ffff? (a) blue (b) yellow (c) cyan (d) bright green
  31. 31.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(185, 87, 56)? (a) red (b) blue (c) green
  33. 33.🌈 Which colour of light is strongest in rgb(167, 34, 108)? (a) green (b) blue (c) red
  34. 34.🌈 In #000045 the blue part is the hex number 45. What is it as a normal number?
  35. 35.🌈 Which hex code is black? (a) #0000ff (b) #ff0000 (c) #ff00ff (d) #000000
  36. 36.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(167, 45, 88)? (a) green (b) blue (c) red
  38. 38.🌈 Which colour of light is strongest in rgb(123, 253, 139)? (a) blue (b) green (c) red
  39. 39.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
  40. 40.🌈 In #00c100 the green part is the hex number c1. What is it as a normal number?

Answer key

  1. red
  2. 100
  3. red
  4. blue
  5. bright green
  6. green
  7. 3
  8. yellow
  9. magenta
  10. #ffff00
  11. yellow
  12. red
  13. #0000ff
  14. #ff00ff
  15. #ffffff
  16. red
  17. 39
  18. #00ff00
  19. red
  20. 115
  21. F
  22. cyan
  23. red
  24. 162
  25. blue
  26. bright green
  27. green
  28. 136
  29. 255
  30. cyan
  31. 8
  32. red
  33. red
  34. 69
  35. #000000
  36. 196
  37. red
  38. green
  39. 196
  40. 193

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