← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 30 · 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) black (b) blue (c) red (d) green
  2. 2.🌈 Which colour of light is strongest in rgb(194, 57, 119)? (a) green (b) blue (c) red
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  4. 4.🌈 In #020000 the red part is the hex number 02. What is it as a normal number?
  5. 5.🌈 Which colour of light is strongest in rgb(231, 30, 85)? (a) blue (b) red (c) green
  6. 6.🌈 Which colour of light is strongest in rgb(61, 166, 137)? (a) green (b) blue (c) red
  7. 7.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) magenta (d) blue
  8. 8.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) blue (c) white (d) red
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  10. 10.🌈 In #00d700 the green part is the hex number d7. What is it as a normal number?
  11. 11.🌈 Which colour is #ffffff? (a) bright green (b) white (c) blue (d) yellow
  12. 12.🌈 Which hex code is magenta? (a) #000000 (b) #00ffff (c) #ffff00 (d) #ff00ff
  13. 13.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  15. 15.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  17. 17.🌈 Which colour of light is strongest in rgb(202, 22, 34)? (a) green (b) blue (c) red
  18. 18.🌈 Which colour of light is strongest in rgb(9, 84, 183)? (a) red (b) green (c) blue
  19. 19.🌈 Which colour is #00ffff? (a) white (b) magenta (c) cyan (d) red
  20. 20.🌈 In #0000fa the blue part is the hex number fa. What is it as a normal number?
  21. 21.🌈 Which colour is #ffff00? (a) magenta (b) red (c) yellow (d) black
  22. 22.🌈 Which hex code is black? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #00ffff
  23. 23.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) red (d) bright green
  24. 24.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) red (c) yellow (d) bright green
  25. 25.🌈 In #000000 the red part is the hex number 00. What is it as a normal number?
  26. 26.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(88, 196, 64)? (a) blue (b) red (c) green
  28. 28.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
  29. 29.🌈 In #008600 the green part is the hex number 86. What is it as a normal number?
  30. 30.🌈 Which hex code is blue? (a) #ff00ff (b) #00ff00 (c) #00ffff (d) #0000ff
  31. 31.🌈 In #350000 the red part is the hex number 35. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(20, 113, 232)? (a) blue (b) red (c) green
  33. 33.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) red
  34. 34.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) bright green (c) white (d) blue
  36. 36.🌈 Which colour is #000000? (a) white (b) black (c) red (d) blue
  37. 37.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) red (d) magenta
  38. 38.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) red (c) white (d) cyan
  39. 39.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
  40. 40.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) red (d) white

Answer key

  1. red
  2. red
  3. blue
  4. 2
  5. red
  6. green
  7. magenta
  8. red
  9. 255
  10. 215
  11. white
  12. #ff00ff
  13. 32
  14. F
  15. 211
  16. 3
  17. red
  18. blue
  19. cyan
  20. 250
  21. yellow
  22. #000000
  23. cyan
  24. yellow
  25. 0
  26. 82
  27. green
  28. 179
  29. 134
  30. #0000ff
  31. 53
  32. blue
  33. bright green
  34. 75
  35. blue
  36. black
  37. bright green
  38. white
  39. 208
  40. magenta

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