← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 224 · 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 red? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #000000
  2. 2.🌈 Which colour of light is strongest in rgb(70, 191, 19)? (a) red (b) green (c) blue
  3. 3.🌈 Which hex code is blue? (a) #0000ff (b) #00ffff (c) #ffffff (d) #ff00ff
  4. 4.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ffffff
  5. 5.🌈 Which colour of light is strongest in rgb(197, 138, 30)? (a) red (b) green (c) blue
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  7. 7.🌈 In #00fa00 the green part is the hex number fa. What is it as a normal number?
  8. 8.🌈 In #006d00 the green part is the hex number 6d. What is it as a normal number?
  9. 9.🌈 Which colour is #00ffff? (a) blue (b) yellow (c) magenta (d) cyan
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  11. 11.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) blue (d) bright green
  12. 12.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) white (d) yellow
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  14. 14.🌈 Which colour of light is strongest in rgb(229, 61, 2)? (a) green (b) blue (c) red
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  16. 16.🌈 Which colour of light is strongest in rgb(80, 125, 166)? (a) green (b) red (c) blue
  17. 17.🌈 Which colour is #ff0000? (a) red (b) blue (c) magenta (d) black
  18. 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  19. 19.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
  20. 20.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) yellow (c) blue (d) bright green
  21. 21.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #ff00ff
  22. 22.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) black (d) red
  23. 23.🌈 Which hex code is black? (a) #0000ff (b) #00ffff (c) #ff00ff (d) #000000
  24. 24.🌈 Which colour is #ffffff? (a) white (b) red (c) bright green (d) blue
  25. 25.🌈 Which colour of light is strongest in rgb(76, 184, 19)? (a) green (b) blue (c) red
  26. 26.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) black (d) yellow
  27. 27.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) bright green (c) black (d) magenta
  28. 28.🌈 Which colour of light is strongest in rgb(102, 208, 88)? (a) green (b) blue (c) red
  29. 29.🌈 In #440000 the red part is the hex number 44. What is it as a normal number?
  30. 30.🌈 Which hex code is magenta? (a) #ffffff (b) #00ffff (c) #000000 (d) #ff00ff
  31. 31.🌈 Which colour of light is strongest in rgb(235, 101, 37)? (a) blue (b) red (c) green
  32. 32.🌈 Which colour of light is strongest in rgb(248, 33, 14)? (a) blue (b) green (c) red
  33. 33.🌈 In #00006b the blue part is the hex number 6b. What is it as a normal number?
  34. 34.🌈 In #00bf00 the green part is the hex number bf. What is it as a normal number?
  35. 35.🌈 Which colour is #ffff00? (a) white (b) magenta (c) cyan (d) yellow
  36. 36.🌈 In #008800 the green part is the hex number 88. What is it as a normal number?
  37. 37.🌈 In #ea0000 the red part is the hex number ea. What is it as a normal number?
  38. 38.🌈 Which hex code is white? (a) #00ffff (b) #00ff00 (c) #ffffff (d) #ff0000
  39. 39.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) black (c) yellow (d) red

Answer key

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

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