← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 98 · 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 blue? (a) #ffff00 (b) #0000ff (c) #ff0000 (d) #ff00ff
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  3. 3.🌈 Which colour of light is strongest in rgb(95, 5, 196)? (a) red (b) green (c) blue
  4. 4.🌈 Which colour of light is strongest in rgb(4, 254, 122)? (a) green (b) red (c) blue
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
  6. 6.🌈 Which colour is #ff0000? (a) magenta (b) black (c) red (d) bright green
  7. 7.🌈 In #0000f8 the blue part is the hex number f8. What is it as a normal number?
  8. 8.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #ff0000
  9. 9.🌈 In #000044 the blue part is the hex number 44. What is it as a normal number?
  10. 10.🌈 Which hex code is black? (a) #ffff00 (b) #ff00ff (c) #000000 (d) #ffffff
  11. 11.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) blue (c) magenta (d) bright green
  12. 12.🌈 Which colour is #ffffff? (a) bright green (b) white (c) yellow (d) red
  13. 13.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #ffffff (d) #ff0000
  14. 14.🌈 Which colour of light is strongest in rgb(234, 121, 82)? (a) green (b) blue (c) red
  15. 15.🌈 In #800000 the red part is the hex number 80. What is it as a normal number?
  16. 16.🌈 In #fe0000 the red part is the hex number fe. What is it as a normal number?
  17. 17.🌈 In #e30000 the red part is the hex number e3. What is it as a normal number?
  18. 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  19. 19.🌈 Which hex code is magenta? (a) #00ffff (b) #000000 (c) #ff00ff (d) #ffffff
  20. 20.🌈 Which colour is #00ff00? (a) magenta (b) bright green (c) cyan (d) red
  21. 21.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) black (d) blue
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  23. 23.🌈 In #005200 the green part is the hex number 52. What is it as a normal number?
  24. 24.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) blue (c) cyan (d) red
  25. 25.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  26. 26.🌈 In #a70000 the red part is the hex number a7. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(250, 119, 55)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour is #00ffff? (a) red (b) yellow (c) black (d) cyan
  29. 29.🌈 In #aa0000 the red part is the hex number aa. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(52, 4, 159)? (a) green (b) red (c) blue
  31. 31.🌈 Which colour is #ff00ff? (a) red (b) bright green (c) magenta (d) cyan
  32. 32.🌈 Which colour is #000000? (a) black (b) cyan (c) red (d) yellow
  33. 33.🌈 Which hex code is red? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #000000
  34. 34.🌈 Which colour of light is strongest in rgb(227, 106, 13)? (a) blue (b) red (c) green
  35. 35.🌈 Which colour is #ffff00? (a) red (b) bright green (c) blue (d) yellow
  36. 36.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) white (c) blue (d) yellow
  38. 38.🌈 Which colour of light is strongest in rgb(237, 58, 76)? (a) green (b) blue (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(30, 21, 190)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) black (d) yellow

Answer key

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

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