← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 246 · 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(198, 98, 33)? (a) red (b) blue (c) green
  2. 2.🌈 Which colour of light is strongest in rgb(163, 23, 24)? (a) red (b) blue (c) green
  3. 3.🌈 Which colour of light is strongest in rgb(251, 32, 63)? (a) red (b) green (c) blue
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  5. 5.🌈 Which colour is #00ffff? (a) bright green (b) black (c) cyan (d) magenta
  6. 6.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) white (c) bright green (d) black
  7. 7.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) bright green (d) white
  8. 8.🌈 Which colour is #ffff00? (a) magenta (b) white (c) yellow (d) black
  9. 9.🌈 Which colour of light is strongest in rgb(25, 169, 47)? (a) blue (b) green (c) red
  10. 10.🌈 Which colour of light is strongest in rgb(110, 42, 187)? (a) green (b) blue (c) red
  11. 11.🌈 Which hex code is yellow? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #0000ff
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  13. 13.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
  14. 14.🌈 Which colour is #ff0000? (a) blue (b) red (c) bright green (d) black
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  16. 16.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #ff0000 (d) #ff00ff
  17. 17.🌈 In #00bc00 the green part is the hex number bc. What is it as a normal number?
  18. 18.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(92, 186, 34)? (a) green (b) red (c) blue
  20. 20.🌈 Which colour is #000000? (a) blue (b) black (c) bright green (d) white
  21. 21.🌈 In #5b0000 the red part is the hex number 5b. What is it as a normal number?
  22. 22.🌈 Which hex code is cyan? (a) #00ffff (b) #ffffff (c) #000000 (d) #0000ff
  23. 23.🌈 Which colour of light is strongest in rgb(241, 24, 123)? (a) blue (b) red (c) green
  24. 24.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) cyan (d) bright green
  25. 25.🌈 In #0000a5 the blue part is the hex number a5. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) white (d) cyan
  27. 27.🌈 Which hex code is magenta? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #0000ff
  28. 28.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #ffff00 (d) #ffffff
  29. 29.🌈 Which colour of light is strongest in rgb(29, 173, 23)? (a) green (b) blue (c) red
  30. 30.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  31. 31.🌈 In #003d00 the green part is the hex number 3d. What is it as a normal number?
  32. 32.🌈 Which hex code is blue? (a) #ff00ff (b) #00ff00 (c) #ffff00 (d) #0000ff
  33. 33.🌈 Which colour of light is strongest in rgb(231, 76, 6)? (a) green (b) blue (c) red
  34. 34.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) yellow (c) red (d) blue
  36. 36.🌈 Which colour of light is strongest in rgb(13, 246, 103)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour is #00ff00? (a) bright green (b) red (c) cyan (d) black
  38. 38.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) magenta (d) blue
  39. 39.🌈 Which colour of light is strongest in rgb(219, 85, 42)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(173, 81, 124)? (a) red (b) blue (c) green

Answer key

  1. red
  2. red
  3. red
  4. 3
  5. cyan
  6. black
  7. magenta
  8. yellow
  9. green
  10. blue
  11. #ffff00
  12. blue
  13. 129
  14. red
  15. F
  16. #ffffff
  17. 188
  18. 77
  19. green
  20. black
  21. 91
  22. #00ffff
  23. red
  24. yellow
  25. 165
  26. bright green
  27. #ff00ff
  28. #ff0000
  29. green
  30. red
  31. 61
  32. #0000ff
  33. red
  34. 205
  35. white
  36. green
  37. bright green
  38. blue
  39. red
  40. red

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