← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 62 · 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 #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  2. 2.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) black (c) bright green (d) blue
  3. 3.🌈 In #f90000 the red part is the hex number f9. What is it as a normal number?
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  5. 5.🌈 Which colour of light is strongest in rgb(211, 94, 17)? (a) green (b) blue (c) red
  6. 6.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) cyan (c) red (d) yellow
  7. 7.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) yellow (c) bright green (d) black
  8. 8.🌈 Which colour of light is strongest in rgb(87, 249, 38)? (a) red (b) blue (c) green
  9. 9.🌈 Which colour of light is strongest in rgb(40, 219, 19)? (a) green (b) red (c) blue
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  11. 11.🌈 Which hex code is red? (a) #ffff00 (b) #00ffff (c) #ff00ff (d) #ff0000
  12. 12.🌈 In #ae0000 the red part is the hex number ae. What is it as a normal number?
  13. 13.🌈 Which hex code is black? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #000000
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  15. 15.🌈 In #00ea00 the green part is the hex number ea. What is it as a normal number?
  16. 16.🌈 Which colour is #ffff00? (a) blue (b) magenta (c) yellow (d) red
  17. 17.🌈 Which colour is #ff00ff? (a) bright green (b) white (c) magenta (d) cyan
  18. 18.🌈 In #00cd00 the green part is the hex number cd. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(135, 184, 18)? (a) green (b) red (c) blue
  20. 20.🌈 Which colour of light is strongest in rgb(128, 243, 88)? (a) red (b) blue (c) green
  21. 21.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #ff0000
  22. 22.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) bright green (d) red
  23. 23.🌈 Which colour is #00ff00? (a) red (b) bright green (c) black (d) yellow
  24. 24.🌈 Which colour of light is strongest in rgb(218, 35, 60)? (a) green (b) blue (c) red
  25. 25.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
  26. 26.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) cyan (d) red
  27. 27.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(9, 61, 197)? (a) green (b) blue (c) red
  29. 29.🌈 In #a60000 the red part is the hex number a6. What is it as a normal number?
  30. 30.🌈 Which hex code is magenta? (a) #0000ff (b) #ff00ff (c) #ffffff (d) #ffff00
  31. 31.🌈 Which colour of light is strongest in rgb(253, 10, 45)? (a) red (b) green (c) blue
  32. 32.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  33. 33.🌈 Which colour is #00ffff? (a) white (b) yellow (c) cyan (d) bright green
  34. 34.🌈 In #f50000 the red part is the hex number f5. What is it as a normal number?
  35. 35.🌈 Which colour is #ffffff? (a) red (b) white (c) bright green (d) blue
  36. 36.🌈 Which colour of light is strongest in rgb(106, 135, 156)? (a) green (b) blue (c) red
  37. 37.🌈 In #00003c the blue part is the hex number 3c. What is it as a normal number?
  38. 38.🌈 Which hex code is bright green? (a) #ff00ff (b) #00ff00 (c) #ff0000 (d) #ffffff
  39. 39.🌈 Which hex code is blue? (a) #00ffff (b) #ff00ff (c) #0000ff (d) #00ff00
  40. 40.🌈 Which colour of light is strongest in rgb(115, 211, 24)? (a) green (b) blue (c) red

Answer key

  1. red
  2. magenta
  3. 249
  4. F
  5. red
  6. yellow
  7. bright green
  8. green
  9. green
  10. blue
  11. #ff0000
  12. 174
  13. #000000
  14. 3
  15. 234
  16. yellow
  17. magenta
  18. 205
  19. green
  20. green
  21. #ffffff
  22. cyan
  23. bright green
  24. red
  25. 24
  26. blue
  27. 196
  28. blue
  29. 166
  30. #ff00ff
  31. red
  32. 255
  33. cyan
  34. 245
  35. white
  36. blue
  37. 60
  38. #00ff00
  39. #0000ff
  40. green

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