← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 103 · 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 #0000b7 the blue part is the hex number b7. What is it as a normal number?
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) black (d) yellow
  3. 3.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #00ff00 (d) #0000ff
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  5. 5.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) black (d) white
  6. 6.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  7. 7.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
  8. 8.🌈 Which colour of light is strongest in rgb(193, 21, 83)? (a) blue (b) red (c) green
  9. 9.🌈 In #000051 the blue part is the hex number 51. What is it as a normal number?
  10. 10.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #0000ff (d) #ff0000
  11. 11.🌈 Which hex code is white? (a) #ffffff (b) #00ffff (c) #ff0000 (d) #00ff00
  12. 12.🌈 Which colour of light is strongest in rgb(86, 202, 21)? (a) green (b) blue (c) red
  13. 13.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) cyan (c) yellow (d) blue
  15. 15.🌈 Which colour of light is strongest in rgb(180, 42, 41)? (a) green (b) red (c) blue
  16. 16.🌈 In #00009f the blue part is the hex number 9f. What is it as a normal number?
  17. 17.🌈 Which hex code is cyan? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ff00ff
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  19. 19.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #00ff00 (d) #00ffff
  20. 20.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) cyan (d) blue
  21. 21.🌈 Which colour of light is strongest in rgb(18, 44, 230)? (a) red (b) blue (c) green
  22. 22.🌈 In #005e00 the green part is the hex number 5e. What is it as a normal number?
  23. 23.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #00ffff
  24. 24.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) bright green (c) yellow (d) magenta
  25. 25.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  26. 26.🌈 Which colour of light is strongest in rgb(241, 54, 85)? (a) blue (b) red (c) green
  27. 27.🌈 Which colour of light is strongest in rgb(214, 18, 46)? (a) red (b) green (c) blue
  28. 28.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  29. 29.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) yellow (c) red (d) bright green
  30. 30.🌈 Which colour is #ff0000? (a) red (b) bright green (c) magenta (d) yellow
  31. 31.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
  32. 32.🌈 Which colour is #000000? (a) blue (b) magenta (c) black (d) yellow
  33. 33.🌈 In #2e0000 the red part is the hex number 2e. What is it as a normal number?
  34. 34.🌈 In #0000df the blue part is the hex number df. What is it as a normal number?
  35. 35.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) bright green (d) cyan
  36. 36.🌈 Which colour of light is strongest in rgb(166, 124, 36)? (a) red (b) blue (c) green
  37. 37.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #0000ff
  38. 38.🌈 Which colour of light is strongest in rgb(244, 136, 64)? (a) blue (b) green (c) red
  39. 39.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) blue (d) cyan

Answer key

  1. 183
  2. black
  3. #00ff00
  4. 3
  5. white
  6. 128
  7. 30
  8. red
  9. 81
  10. #ff0000
  11. #ffffff
  12. green
  13. 123
  14. yellow
  15. red
  16. 159
  17. #00ffff
  18. red
  19. #0000ff
  20. magenta
  21. blue
  22. 94
  23. #ffff00
  24. magenta
  25. 255
  26. red
  27. red
  28. blue
  29. bright green
  30. red
  31. 136
  32. black
  33. 46
  34. 223
  35. yellow
  36. red
  37. #ff00ff
  38. red
  39. 98
  40. red

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