← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 308 · 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 yellow? (a) #0000ff (b) #ffff00 (c) #ff0000 (d) #00ffff
  2. 2.🌈 Which colour is #00ff00? (a) yellow (b) black (c) red (d) bright green
  3. 3.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) blue (d) white
  4. 4.🌈 Which colour of light is strongest in rgb(61, 11, 253)? (a) green (b) red (c) blue
  5. 5.🌈 Which colour of light is strongest in rgb(186, 49, 28)? (a) red (b) blue (c) green
  6. 6.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) magenta (d) bright green
  7. 7.🌈 Which colour of light is strongest in rgb(31, 192, 17)? (a) blue (b) green (c) red
  8. 8.🌈 In #000010 the blue part is the hex number 10. What is it as a normal number?
  9. 9.🌈 Which hex code is red? (a) #ff00ff (b) #000000 (c) #00ffff (d) #ff0000
  10. 10.🌈 Which colour of light is strongest in rgb(11, 129, 153)? (a) blue (b) red (c) green
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  12. 12.🌈 Which colour of light is strongest in rgb(57, 188, 43)? (a) blue (b) red (c) green
  13. 13.🌈 Which colour is #ffff00? (a) blue (b) bright green (c) red (d) yellow
  14. 14.🌈 Which colour is #00ffff? (a) black (b) red (c) blue (d) cyan
  15. 15.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(152, 24, 19)? (a) red (b) blue (c) green
  17. 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  19. 19.🌈 Which colour is #0000ff? (a) black (b) red (c) blue (d) cyan
  20. 20.🌈 In #00005b the blue part is the hex number 5b. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(245, 106, 95)? (a) green (b) blue (c) red
  22. 22.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  23. 23.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) white (c) yellow (d) magenta
  24. 24.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  25. 25.🌈 In #00dc00 the green part is the hex number dc. What is it as a normal number?
  26. 26.🌈 Which colour is #ffffff? (a) yellow (b) black (c) white (d) blue
  27. 27.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #ff0000
  28. 28.🌈 In #0000fd the blue part is the hex number fd. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(172, 6, 76)? (a) blue (b) red (c) green
  30. 30.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #0000ff (d) #ffffff
  31. 31.🌈 Which colour is #ff0000? (a) bright green (b) red (c) black (d) cyan
  32. 32.🌈 Which colour of light is strongest in rgb(122, 99, 176)? (a) red (b) blue (c) green
  33. 33.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(12, 100, 224)? (a) green (b) red (c) blue
  35. 35.🌈 In #003c00 the green part is the hex number 3c. What is it as a normal number?
  36. 36.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  37. 37.🌈 Which colour of light is strongest in rgb(115, 117, 164)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) yellow (c) bright green (d) cyan
  39. 39.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
  40. 40.🌈 In #00006d the blue part is the hex number 6d. What is it as a normal number?

Answer key

  1. #ffff00
  2. bright green
  3. yellow
  4. blue
  5. red
  6. white
  7. green
  8. 16
  9. #ff0000
  10. blue
  11. F
  12. green
  13. yellow
  14. cyan
  15. 98
  16. red
  17. 3
  18. red
  19. blue
  20. 91
  21. red
  22. blue
  23. magenta
  24. 75
  25. 220
  26. white
  27. #ff00ff
  28. 253
  29. red
  30. #00ffff
  31. red
  32. blue
  33. 33
  34. blue
  35. 60
  36. 255
  37. blue
  38. bright green
  39. 71
  40. 109

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