← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 128 · 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 #000033 the blue part is the hex number 33. What is it as a normal number?
  2. 2.🌈 Which colour of light is strongest in rgb(27, 183, 36)? (a) red (b) blue (c) green
  3. 3.🌈 Which colour of light is strongest in rgb(190, 114, 52)? (a) green (b) red (c) blue
  4. 4.🌈 Which colour of light is strongest in rgb(221, 127, 36)? (a) green (b) blue (c) red
  5. 5.🌈 Which hex code is red? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #0000ff
  6. 6.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #ff00ff (d) #0000ff
  7. 7.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  9. 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  10. 10.🌈 Which colour is #00ff00? (a) yellow (b) white (c) black (d) bright green
  11. 11.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) red (d) cyan
  12. 12.🌈 Which colour of light is strongest in rgb(239, 108, 115)? (a) green (b) red (c) blue
  13. 13.🌈 Which colour of light is strongest in rgb(22, 133, 187)? (a) red (b) blue (c) green
  14. 14.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) bright green (c) yellow (d) black
  15. 15.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) white (d) black
  16. 16.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ff00ff
  17. 17.🌈 Which colour of light is strongest in rgb(25, 208, 18)? (a) blue (b) green (c) red
  18. 18.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) blue (c) magenta (d) yellow
  19. 19.🌈 Which colour of light is strongest in rgb(97, 195, 40)? (a) red (b) green (c) blue
  20. 20.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
  21. 21.🌈 Which colour is #ffff00? (a) magenta (b) red (c) yellow (d) blue
  22. 22.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #ff0000 (d) #000000
  23. 23.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  24. 24.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #00ffff
  25. 25.🌈 Which colour of light is strongest in rgb(232, 32, 55)? (a) red (b) green (c) blue
  26. 26.🌈 Which colour is #000000? (a) bright green (b) cyan (c) red (d) black
  27. 27.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
  28. 28.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(76, 158, 92)? (a) green (b) red (c) blue
  30. 30.🌈 Which colour of light is strongest in rgb(167, 56, 123)? (a) blue (b) red (c) green
  31. 31.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
  32. 32.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
  33. 33.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
  34. 34.🌈 Which colour of light is strongest in rgb(51, 99, 229)? (a) red (b) green (c) blue
  35. 35.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) white (d) red
  36. 36.🌈 Which colour of light is strongest in rgb(8, 224, 35)? (a) green (b) blue (c) red
  37. 37.🌈 In #0000c2 the blue part is the hex number c2. What is it as a normal number?
  38. 38.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
  39. 39.🌈 In #0000c0 the blue part is the hex number c0. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(1, 242, 29)? (a) green (b) red (c) blue

Answer key

  1. 51
  2. green
  3. red
  4. red
  5. #ff0000
  6. #0000ff
  7. 23
  8. F
  9. 3
  10. bright green
  11. bright green
  12. red
  13. blue
  14. white
  15. red
  16. #00ff00
  17. green
  18. yellow
  19. green
  20. 3
  21. yellow
  22. #ff00ff
  23. red
  24. #ffffff
  25. red
  26. black
  27. 98
  28. 132
  29. green
  30. red
  31. 188
  32. 105
  33. blue
  34. blue
  35. magenta
  36. green
  37. 194
  38. 178
  39. 192
  40. green

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