← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 330 · 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 hex code is magenta? (a) #000000 (b) #ffffff (c) #ff00ff (d) #00ffff
  2. 2.🌈 Which colour is #0000ff? (a) cyan (b) magenta (c) blue (d) bright green
  3. 3.🌈 Which colour is #00ffff? (a) white (b) cyan (c) yellow (d) magenta
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
  5. 5.🌈 In #00da00 the green part is the hex number da. What is it as a normal number?
  6. 6.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
  7. 7.🌈 Which colour is #ff0000? (a) yellow (b) cyan (c) white (d) red
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  9. 9.🌈 Which hex code is yellow? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #ffffff
  10. 10.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) white (c) bright green (d) magenta
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) black (d) blue
  12. 12.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #000000
  13. 13.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) magenta (d) red
  14. 14.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
  15. 15.🌈 Which colour is #00ff00? (a) magenta (b) white (c) blue (d) bright green
  16. 16.🌈 Which colour of light is strongest in rgb(11, 157, 0)? (a) green (b) blue (c) red
  17. 17.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) yellow (c) red (d) black
  20. 20.🌈 In #00a900 the green part is the hex number a9. What is it as a normal number?
  21. 21.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) cyan (c) yellow (d) bright green
  22. 22.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) white (d) bright green
  23. 23.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #ff0000
  24. 24.🌈 In #000072 the blue part is the hex number 72. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(13, 122, 170)? (a) blue (b) green (c) red
  26. 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  27. 27.🌈 In #005f00 the green part is the hex number 5f. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) yellow (c) bright green (d) blue
  29. 29.🌈 Which colour is #000000? (a) bright green (b) yellow (c) black (d) blue
  30. 30.🌈 In #001e00 the green part is the hex number 1e. What is it as a normal number?
  31. 31.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(249, 119, 61)? (a) green (b) blue (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(157, 85, 108)? (a) red (b) green (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(55, 51, 248)? (a) red (b) blue (c) green
  35. 35.🌈 Which hex code is black? (a) #000000 (b) #ff0000 (c) #0000ff (d) #ff00ff
  36. 36.🌈 Which colour of light is strongest in rgb(229, 20, 88)? (a) red (b) blue (c) green
  37. 37.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
  38. 38.🌈 Which colour is #ffffff? (a) white (b) blue (c) red (d) magenta
  39. 39.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) yellow (d) cyan
  40. 40.🌈 Which hex code is white? (a) #ff00ff (b) #000000 (c) #0000ff (d) #ffffff

Answer key

  1. #ff00ff
  2. blue
  3. cyan
  4. 3
  5. 218
  6. 98
  7. red
  8. blue
  9. #ffff00
  10. magenta
  11. red
  12. #00ffff
  13. cyan
  14. 143
  15. bright green
  16. green
  17. red
  18. 255
  19. black
  20. 169
  21. yellow
  22. magenta
  23. #ff0000
  24. 114
  25. blue
  26. F
  27. 95
  28. bright green
  29. black
  30. 30
  31. 64
  32. red
  33. red
  34. blue
  35. #000000
  36. red
  37. 99
  38. white
  39. blue
  40. #ffffff

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