← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 174 · 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 last two digits give? (a) red (b) blue (c) white (d) green
  2. 2.🌈 Which hex code is red? (a) #ffffff (b) #000000 (c) #0000ff (d) #ff0000
  3. 3.🌈 Which colour of light is strongest in rgb(238, 136, 10)? (a) red (b) green (c) blue
  4. 4.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) red (d) white
  5. 5.🌈 Which colour is #000000? (a) red (b) yellow (c) bright green (d) black
  6. 6.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #ffffff
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  8. 8.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) magenta (d) red
  9. 9.🌈 Which colour of light is strongest in rgb(173, 5, 78)? (a) green (b) blue (c) red
  10. 10.🌈 Which colour of light is strongest in rgb(59, 178, 30)? (a) green (b) red (c) blue
  11. 11.🌈 Which colour is #ffff00? (a) black (b) yellow (c) magenta (d) cyan
  12. 12.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #0000ff
  13. 13.🌈 Which colour is #0000ff? (a) black (b) red (c) white (d) blue
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) cyan (d) white
  15. 15.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) red (d) black
  17. 17.🌈 Which colour of light is strongest in rgb(173, 82, 132)? (a) blue (b) green (c) red
  18. 18.🌈 Which colour of light is strongest in rgb(163, 18, 25)? (a) blue (b) red (c) green
  19. 19.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) cyan (d) red
  20. 20.🌈 In #000094 the blue part is the hex number 94. What is it as a normal number?
  21. 21.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #ffff00
  22. 22.🌈 In #740000 the red part is the hex number 74. What is it as a normal number?
  23. 23.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #ffff00 (d) #00ff00
  24. 24.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(188, 30, 10)? (a) blue (b) red (c) green
  26. 26.🌈 In #001300 the green part is the hex number 13. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(180, 52, 111)? (a) blue (b) red (c) green
  28. 28.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) magenta (d) bright green
  29. 29.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) magenta (c) white (d) cyan
  31. 31.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  32. 32.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
  33. 33.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) white (d) bright green
  34. 34.🌈 In #2b0000 the red part is the hex number 2b. What is it as a normal number?
  35. 35.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(137, 6, 171)? (a) blue (b) red (c) green
  37. 37.🌈 In #008900 the green part is the hex number 89. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(178, 31, 3)? (a) blue (b) green (c) red
  39. 39.🌈 Which colour is #ff0000? (a) magenta (b) white (c) cyan (d) red
  40. 40.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffff00 (c) #00ffff (d) #ff0000

Answer key

  1. blue
  2. #ff0000
  3. red
  4. magenta
  5. black
  6. #00ff00
  7. 255
  8. blue
  9. red
  10. green
  11. yellow
  12. #0000ff
  13. blue
  14. bright green
  15. 241
  16. black
  17. red
  18. red
  19. white
  20. 148
  21. #ffffff
  22. 116
  23. #000000
  24. 82
  25. red
  26. 19
  27. red
  28. yellow
  29. 9
  30. cyan
  31. red
  32. 229
  33. bright green
  34. 43
  35. 84
  36. blue
  37. 137
  38. red
  39. red
  40. #ff00ff

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