← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 127 · 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 #000e00 the green part is the hex number 0e. What is it as a normal number?
  2. 2.🌈 Which colour is #00ff00? (a) black (b) magenta (c) bright green (d) red
  3. 3.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
  4. 4.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #00ffff
  5. 5.🌈 Which colour of light is strongest in rgb(40, 118, 163)? (a) green (b) blue (c) red
  6. 6.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) bright green (d) black
  7. 7.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  8. 8.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
  9. 9.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #00ffff
  10. 10.🌈 Which colour of light is strongest in rgb(177, 20, 65)? (a) blue (b) green (c) red
  11. 11.🌈 Which colour of light is strongest in rgb(50, 222, 41)? (a) red (b) green (c) blue
  12. 12.🌈 Which colour of light is strongest in rgb(34, 199, 31)? (a) red (b) blue (c) green
  13. 13.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) magenta (d) blue
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
  15. 15.🌈 Which colour of light is strongest in rgb(11, 93, 167)? (a) red (b) green (c) blue
  16. 16.🌈 Which colour of light is strongest in rgb(152, 111, 29)? (a) blue (b) green (c) red
  17. 17.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(8, 214, 108)? (a) blue (b) green (c) red
  19. 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  20. 20.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  21. 21.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(194, 86, 87)? (a) green (b) red (c) blue
  23. 23.🌈 Which colour is #0000ff? (a) red (b) magenta (c) blue (d) bright green
  24. 24.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) blue (d) cyan
  25. 25.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
  26. 26.🌈 Which hex code is magenta? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #ff00ff
  27. 27.🌈 Which colour of light is strongest in rgb(171, 130, 25)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour of light is strongest in rgb(166, 105, 3)? (a) green (b) blue (c) red
  29. 29.🌈 Which colour of light is strongest in rgb(191, 91, 117)? (a) green (b) blue (c) red
  30. 30.🌈 Which colour of light is strongest in rgb(113, 64, 161)? (a) red (b) blue (c) green
  31. 31.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #ff00ff (d) #0000ff
  32. 32.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) red
  33. 33.🌈 In #000700 the green part is the hex number 07. What is it as a normal number?
  34. 34.🌈 Which colour is #ff0000? (a) cyan (b) black (c) red (d) white
  35. 35.🌈 Which colour is #ffffff? (a) red (b) magenta (c) blue (d) white
  36. 36.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) yellow (d) black
  37. 37.🌈 Which colour of light is strongest in rgb(77, 177, 127)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) yellow (c) bright green (d) red
  39. 39.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) yellow (c) black (d) magenta
  40. 40.🌈 Which hex code is yellow? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ffff00

Answer key

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

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