← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 247 · 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 colour is #ff00ff? (a) yellow (b) red (c) magenta (d) blue
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  5. 5.🌈 Which colour of light is strongest in rgb(210, 129, 72)? (a) green (b) blue (c) red
  6. 6.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) magenta (d) yellow
  7. 7.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) yellow (c) black (d) red
  8. 8.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) yellow (c) red (d) cyan
  9. 9.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #00ff00 (d) #ffff00
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) white (d) green
  11. 11.🌈 Which colour is #ffff00? (a) magenta (b) black (c) yellow (d) cyan
  12. 12.🌈 Which colour of light is strongest in rgb(39, 172, 130)? (a) red (b) green (c) blue
  13. 13.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) black (d) bright green
  14. 14.🌈 Which hex code is blue? (a) #0000ff (b) #00ffff (c) #ffff00 (d) #ffffff
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  16. 16.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?
  17. 17.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  18. 18.🌈 Which hex code is bright green? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #000000
  19. 19.🌈 Which colour is #ffffff? (a) bright green (b) magenta (c) black (d) white
  20. 20.🌈 In #000004 the blue part is the hex number 04. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(136, 231, 21)? (a) blue (b) red (c) green
  22. 22.🌈 Which colour is #ff0000? (a) magenta (b) red (c) cyan (d) white
  23. 23.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(23, 252, 140)? (a) red (b) blue (c) green
  25. 25.🌈 Which colour is #000000? (a) cyan (b) red (c) black (d) blue
  26. 26.🌈 In #005d00 the green part is the hex number 5d. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(164, 75, 133)? (a) red (b) blue (c) green
  28. 28.🌈 Which colour of light is strongest in rgb(124, 155, 134)? (a) blue (b) red (c) green
  29. 29.🌈 In #760000 the red part is the hex number 76. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(5, 98, 162)? (a) red (b) green (c) blue
  31. 31.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
  32. 32.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(238, 76, 106)? (a) red (b) blue (c) green
  34. 34.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) blue (d) bright green
  35. 35.🌈 Which hex code is red? (a) #ffffff (b) #000000 (c) #00ff00 (d) #ff0000
  36. 36.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(222, 129, 75)? (a) red (b) green (c) blue
  38. 38.🌈 In #003700 the green part is the hex number 37. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(9, 176, 104)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(18, 41, 204)? (a) blue (b) red (c) green

Answer key

  1. magenta
  2. F
  3. red
  4. 3
  5. red
  6. magenta
  7. black
  8. yellow
  9. #000000
  10. blue
  11. yellow
  12. green
  13. white
  14. #0000ff
  15. 255
  16. 205
  17. 75
  18. #00ff00
  19. white
  20. 4
  21. green
  22. red
  23. 38
  24. green
  25. black
  26. 93
  27. red
  28. green
  29. 118
  30. blue
  31. 141
  32. 48
  33. red
  34. bright green
  35. #ff0000
  36. 16
  37. red
  38. 55
  39. green
  40. blue

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