← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 60 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  2. 2.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffffff
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) blue (c) yellow (d) bright green
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
  6. 6.🌈 Which colour of light is strongest in rgb(216, 140, 107)? (a) red (b) blue (c) green
  7. 7.🌈 Which colour is #ff0000? (a) magenta (b) yellow (c) bright green (d) red
  8. 8.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #ffffff (d) #ffff00
  9. 9.🌈 Which colour is #ff00ff? (a) cyan (b) red (c) magenta (d) bright green
  10. 10.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) blue (d) black
  11. 11.🌈 Which colour is #000000? (a) black (b) white (c) yellow (d) red
  12. 12.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
  13. 13.🌈 Which hex code is yellow? (a) #ffffff (b) #ff0000 (c) #000000 (d) #ffff00
  14. 14.🌈 Which colour is #ffff00? (a) blue (b) cyan (c) red (d) yellow
  15. 15.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #00ff00
  16. 16.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) cyan (c) red (d) bright green
  17. 17.🌈 Which colour of light is strongest in rgb(184, 20, 12)? (a) green (b) red (c) blue
  18. 18.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
  19. 19.🌈 In #0000ec the blue part is the hex number ec. What is it as a normal number?
  20. 20.🌈 Which colour of light is strongest in rgb(56, 61, 217)? (a) green (b) red (c) blue
  21. 21.🌈 Which colour of light is strongest in rgb(117, 178, 32)? (a) red (b) blue (c) green
  22. 22.🌈 In #00f000 the green part is the hex number f0. What is it as a normal number?
  23. 23.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  24. 24.🌈 In #2a0000 the red part is the hex number 2a. What is it as a normal number?
  25. 25.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  26. 26.🌈 Which colour is #00ff00? (a) white (b) cyan (c) black (d) bright green
  27. 27.🌈 Which colour is #0000ff? (a) black (b) blue (c) white (d) bright green
  28. 28.🌈 In #0000ef the blue part is the hex number ef. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(80, 240, 32)? (a) green (b) blue (c) red
  30. 30.🌈 Which colour is #ffffff? (a) white (b) blue (c) magenta (d) cyan
  31. 31.🌈 Which colour of light is strongest in rgb(64, 158, 127)? (a) green (b) red (c) blue
  32. 32.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) black (c) cyan (d) white
  34. 34.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) magenta (c) red (d) black
  35. 35.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #0000ff (d) #ff00ff
  36. 36.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) cyan (c) black (d) white
  38. 38.🌈 In #000014 the blue part is the hex number 14. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(72, 72, 228)? (a) green (b) red (c) blue
  40. 40.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) blue (c) magenta (d) red

Answer key

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

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