← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 125 · 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 #7b0000 the red part is the hex number 7b. What is it as a normal number?
  2. 2.🌈 Which hex code is magenta? (a) #00ff00 (b) #ffff00 (c) #ff00ff (d) #ffffff
  3. 3.🌈 Which colour is #ff0000? (a) magenta (b) red (c) black (d) yellow
  4. 4.🌈 Which hex code is yellow? (a) #ff00ff (b) #0000ff (c) #ffff00 (d) #ffffff
  5. 5.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) black (c) magenta (d) yellow
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  7. 7.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  8. 8.🌈 Which hex code is cyan? (a) #000000 (b) #00ff00 (c) #00ffff (d) #ffffff
  9. 9.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) yellow (d) blue
  10. 10.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
  11. 11.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(201, 91, 116)? (a) blue (b) green (c) red
  13. 13.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) cyan (d) bright green
  14. 14.🌈 Which colour is #ffff00? (a) black (b) cyan (c) red (d) yellow
  15. 15.🌈 In #0000ef the blue part is the hex number ef. What is it as a normal number?
  16. 16.🌈 Which colour is #00ff00? (a) black (b) bright green (c) cyan (d) magenta
  17. 17.🌈 In #00be00 the green part is the hex number be. What is it as a normal number?
  18. 18.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
  19. 19.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  21. 21.🌈 In #490000 the red part is the hex number 49. What is it as a normal number?
  22. 22.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
  23. 23.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #ffffff
  24. 24.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) bright green (c) black (d) blue
  25. 25.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) white
  26. 26.🌈 In #860000 the red part is the hex number 86. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(31, 220, 38)? (a) blue (b) green (c) red
  28. 28.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(100, 179, 13)? (a) red (b) blue (c) green
  30. 30.🌈 Which colour of light is strongest in rgb(176, 122, 13)? (a) blue (b) green (c) red
  31. 31.🌈 In #000067 the blue part is the hex number 67. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(208, 79, 3)? (a) blue (b) red (c) green
  33. 33.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) white (d) black
  34. 34.🌈 Which hex code is red? (a) #0000ff (b) #ffff00 (c) #ff0000 (d) #000000
  35. 35.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  36. 36.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) blue (d) yellow
  37. 37.🌈 Which hex code is blue? (a) #00ffff (b) #00ff00 (c) #0000ff (d) #ff0000
  38. 38.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) bright green (c) blue (d) red
  39. 39.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
  40. 40.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?

Answer key

  1. 123
  2. #ff00ff
  3. red
  4. #ffff00
  5. yellow
  6. F
  7. blue
  8. #00ffff
  9. cyan
  10. #000000
  11. 196
  12. red
  13. magenta
  14. yellow
  15. 239
  16. bright green
  17. 190
  18. 243
  19. 41
  20. red
  21. 73
  22. 202
  23. #00ff00
  24. black
  25. black
  26. 134
  27. green
  28. 42
  29. green
  30. red
  31. 103
  32. red
  33. cyan
  34. #ff0000
  35. 255
  36. blue
  37. #0000ff
  38. red
  39. 69
  40. 211

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