← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 51 · 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) #ff00ff (b) #00ffff (c) #ffff00 (d) #ffffff
  2. 2.🌈 Which colour of light is strongest in rgb(25, 63, 215)? (a) blue (b) green (c) red
  3. 3.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) magenta (c) red (d) black
  4. 4.🌈 Which hex code is white? (a) #ffff00 (b) #00ff00 (c) #ffffff (d) #0000ff
  5. 5.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
  6. 6.🌈 Which colour of light is strongest in rgb(85, 227, 67)? (a) blue (b) red (c) green
  7. 7.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) white (d) yellow
  8. 8.🌈 Which hex code is yellow? (a) #ff00ff (b) #00ff00 (c) #ffff00 (d) #00ffff
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  10. 10.🌈 Which colour of light is strongest in rgb(171, 132, 102)? (a) green (b) blue (c) red
  11. 11.🌈 In #005d00 the green part is the hex number 5d. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) yellow (c) blue (d) magenta
  13. 13.🌈 Which colour is #ff0000? (a) white (b) black (c) red (d) cyan
  14. 14.🌈 In #130000 the red part is the hex number 13. What is it as a normal number?
  15. 15.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  17. 17.🌈 Which hex code is black? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #000000
  18. 18.🌈 Which colour is #ffffff? (a) white (b) magenta (c) yellow (d) red
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) bright green (c) cyan (d) black
  20. 20.🌈 Which colour is #00ffff? (a) bright green (b) yellow (c) cyan (d) white
  21. 21.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  22. 22.🌈 Which colour is #00ff00? (a) bright green (b) red (c) yellow (d) cyan
  23. 23.🌈 In #00d900 the green part is the hex number d9. What is it as a normal number?
  24. 24.🌈 In #00b900 the green part is the hex number b9. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) magenta (c) white (d) cyan
  26. 26.🌈 Which colour is #ff00ff? (a) yellow (b) magenta (c) white (d) blue
  27. 27.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  28. 28.🌈 Which colour of light is strongest in rgb(87, 184, 100)? (a) green (b) blue (c) red
  29. 29.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  30. 30.🌈 Which colour of light is strongest in rgb(152, 54, 2)? (a) green (b) blue (c) red
  31. 31.🌈 In #590000 the red part is the hex number 59. What is it as a normal number?
  32. 32.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #ffffff (d) #ffff00
  33. 33.🌈 In #b80000 the red part is the hex number b8. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(103, 161, 126)? (a) blue (b) red (c) green
  35. 35.🌈 In #00ae00 the green part is the hex number ae. What is it as a normal number?
  36. 36.🌈 In #0000cf the blue part is the hex number cf. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) blue (c) red (d) cyan
  38. 38.🌈 Which colour of light is strongest in rgb(157, 92, 28)? (a) red (b) blue (c) green
  39. 39.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(28, 123, 228)? (a) blue (b) green (c) red

Answer key

  1. #ff00ff
  2. blue
  3. magenta
  4. #ffffff
  5. 211
  6. green
  7. bright green
  8. #ffff00
  9. 255
  10. red
  11. 93
  12. yellow
  13. red
  14. 19
  15. 8
  16. blue
  17. #000000
  18. white
  19. black
  20. cyan
  21. red
  22. bright green
  23. 217
  24. 185
  25. cyan
  26. magenta
  27. F
  28. green
  29. 3
  30. red
  31. 89
  32. #00ffff
  33. 184
  34. green
  35. 174
  36. 207
  37. red
  38. red
  39. 23
  40. blue

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