← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 254 · 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 is rgb(255, 0, 0)? (a) cyan (b) red (c) magenta (d) white
  2. 2.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #ff00ff (d) #000000
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  6. 6.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) blue (d) cyan
  7. 7.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) magenta (c) black (d) blue
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  9. 9.🌈 Which colour of light is strongest in rgb(170, 130, 123)? (a) blue (b) green (c) red
  10. 10.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #00ff00 (d) #ffffff
  11. 11.🌈 Which colour of light is strongest in rgb(234, 98, 38)? (a) red (b) green (c) blue
  12. 12.🌈 Which colour of light is strongest in rgb(214, 16, 120)? (a) blue (b) red (c) green
  13. 13.🌈 Which colour of light is strongest in rgb(4, 162, 46)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour of light is strongest in rgb(140, 53, 194)? (a) red (b) blue (c) green
  15. 15.🌈 Which colour is #000000? (a) blue (b) white (c) magenta (d) black
  16. 16.🌈 Which colour of light is strongest in rgb(46, 75, 171)? (a) blue (b) green (c) red
  17. 17.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
  18. 18.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) red (d) white
  19. 19.🌈 Which colour of light is strongest in rgb(2, 209, 16)? (a) green (b) blue (c) red
  20. 20.🌈 In #000010 the blue part is the hex number 10. What is it as a normal number?
  21. 21.🌈 Which colour is #ff0000? (a) red (b) white (c) blue (d) magenta
  22. 22.🌈 In #0000da the blue part is the hex number da. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) bright green (c) magenta (d) red
  24. 24.🌈 In #00ef00 the green part is the hex number ef. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) black (c) blue (d) white
  26. 26.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #0000ff (d) #00ff00
  27. 27.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) white (d) yellow
  28. 28.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #ffff00
  29. 29.🌈 Which colour is #ffff00? (a) white (b) blue (c) magenta (d) yellow
  30. 30.🌈 Which colour is #0000ff? (a) black (b) blue (c) cyan (d) bright green
  31. 31.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) yellow (d) white
  32. 32.🌈 Which hex code is red? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #ff0000
  33. 33.🌈 In #00e200 the green part is the hex number e2. What is it as a normal number?
  34. 34.🌈 In #00cc00 the green part is the hex number cc. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(184, 131, 68)? (a) green (b) red (c) blue
  36. 36.🌈 In #590000 the red part is the hex number 59. What is it as a normal number?
  37. 37.🌈 Which hex code is black? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #ffffff
  38. 38.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
  39. 39.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) black (d) bright green
  40. 40.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #00ff00 (d) #0000ff

Answer key

  1. red
  2. #ffffff
  3. blue
  4. 3
  5. red
  6. cyan
  7. black
  8. F
  9. red
  10. #ff00ff
  11. red
  12. red
  13. green
  14. blue
  15. black
  16. blue
  17. 66
  18. white
  19. green
  20. 16
  21. red
  22. 218
  23. bright green
  24. 239
  25. blue
  26. #00ff00
  27. magenta
  28. #0000ff
  29. yellow
  30. blue
  31. bright green
  32. #ff0000
  33. 226
  34. 204
  35. red
  36. 89
  37. #000000
  38. 38
  39. cyan
  40. #00ffff

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