← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 178 · 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) G (b) F (c) Z (d) J
  2. 2.🌈 Which colour is #ffff00? (a) white (b) yellow (c) red (d) bright green
  3. 3.🌈 Which hex code is cyan? (a) #0000ff (b) #000000 (c) #00ffff (d) #ffff00
  4. 4.🌈 Which colour of light is strongest in rgb(36, 140, 158)? (a) red (b) blue (c) green
  5. 5.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) yellow (c) cyan (d) magenta
  6. 6.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff0000
  7. 7.🌈 Which colour of light is strongest in rgb(185, 103, 36)? (a) red (b) green (c) blue
  8. 8.🌈 Which colour of light is strongest in rgb(47, 86, 187)? (a) blue (b) green (c) red
  9. 9.🌈 In #007700 the green part is the hex number 77. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(66, 211, 99)? (a) red (b) blue (c) green
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  12. 12.🌈 Which colour is #0000ff? (a) black (b) bright green (c) cyan (d) blue
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  14. 14.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  15. 15.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  16. 16.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) cyan (c) white (d) magenta
  17. 17.🌈 In #00008a the blue part is the hex number 8a. What is it as a normal number?
  18. 18.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
  19. 19.🌈 Which hex code is magenta? (a) #ff0000 (b) #000000 (c) #00ffff (d) #ff00ff
  20. 20.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
  21. 21.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
  22. 22.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) bright green (d) magenta
  23. 23.🌈 Which colour is #ff0000? (a) blue (b) black (c) bright green (d) red
  24. 24.🌈 Which colour of light is strongest in rgb(26, 235, 81)? (a) green (b) red (c) blue
  25. 25.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) blue (c) white (d) bright green
  26. 26.🌈 In #00008d the blue part is the hex number 8d. What is it as a normal number?
  27. 27.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
  28. 28.🌈 In #610000 the red part is the hex number 61. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(15, 29, 190)? (a) red (b) blue (c) green
  30. 30.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) cyan (c) yellow (d) blue
  31. 31.🌈 In #240000 the red part is the hex number 24. What is it as a normal number?
  32. 32.🌈 Which colour is #000000? (a) red (b) yellow (c) cyan (d) black
  33. 33.🌈 Which hex code is black? (a) #ff00ff (b) #ffffff (c) #000000 (d) #ffff00
  34. 34.🌈 Which colour of light is strongest in rgb(192, 119, 76)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(26, 65, 203)? (a) green (b) red (c) blue
  36. 36.🌈 In #110000 the red part is the hex number 11. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) cyan (c) black (d) white
  38. 38.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
  39. 39.🌈 In #00c000 the green part is the hex number c0. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(107, 64, 203)? (a) blue (b) red (c) green

Answer key

  1. F
  2. yellow
  3. #00ffff
  4. blue
  5. cyan
  6. #ffff00
  7. red
  8. blue
  9. 119
  10. green
  11. blue
  12. blue
  13. red
  14. 255
  15. 3
  16. magenta
  17. 138
  18. 229
  19. #ff00ff
  20. 35
  21. 75
  22. red
  23. red
  24. green
  25. white
  26. 141
  27. 197
  28. 97
  29. blue
  30. blue
  31. 36
  32. black
  33. #000000
  34. red
  35. blue
  36. 17
  37. black
  38. 241
  39. 192
  40. blue

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