← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 241 · 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 rgb(0, 255, 0)? (a) bright green (b) blue (c) white (d) cyan
  2. 2.🌈 Which colour is #ff00ff? (a) yellow (b) bright green (c) magenta (d) blue
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) yellow (c) cyan (d) blue
  4. 4.🌈 Which colour of light is strongest in rgb(31, 94, 167)? (a) green (b) blue (c) red
  5. 5.🌈 Which colour of light is strongest in rgb(157, 25, 4)? (a) blue (b) red (c) green
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  7. 7.🌈 Which colour of light is strongest in rgb(166, 72, 34)? (a) green (b) blue (c) red
  8. 8.🌈 Which colour is #00ffff? (a) red (b) yellow (c) cyan (d) black
  9. 9.🌈 Which colour is #ffff00? (a) red (b) yellow (c) white (d) bright green
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
  11. 11.🌈 Which colour of light is strongest in rgb(178, 5, 103)? (a) red (b) blue (c) green
  12. 12.🌈 In #00000e the blue part is the hex number 0e. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(73, 91, 248)? (a) red (b) green (c) blue
  14. 14.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
  15. 15.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #000000 (d) #ff0000
  16. 16.🌈 Which hex code is blue? (a) #0000ff (b) #00ffff (c) #000000 (d) #ffff00
  17. 17.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ffff00 (d) #ff0000
  18. 18.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
  19. 19.🌈 In #600000 the red part is the hex number 60. What is it as a normal number?
  20. 20.🌈 Which colour of light is strongest in rgb(41, 162, 24)? (a) blue (b) green (c) red
  21. 21.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  22. 22.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  23. 23.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
  24. 24.🌈 In #000058 the blue part is the hex number 58. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(46, 248, 140)? (a) green (b) blue (c) red
  26. 26.🌈 Which colour is #ffffff? (a) blue (b) red (c) white (d) yellow
  27. 27.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) cyan (d) blue
  28. 28.🌈 Which hex code is cyan? (a) #ffff00 (b) #0000ff (c) #000000 (d) #00ffff
  29. 29.🌈 Which colour of light is strongest in rgb(167, 82, 44)? (a) blue (b) red (c) green
  30. 30.🌈 In #590000 the red part is the hex number 59. What is it as a normal number?
  31. 31.🌈 Which hex code is white? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ffffff
  32. 32.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  33. 33.🌈 Which colour of light is strongest in rgb(243, 11, 73)? (a) green (b) blue (c) red
  34. 34.🌈 In #850000 the red part is the hex number 85. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(196, 82, 9)? (a) red (b) blue (c) green
  36. 36.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) blue (c) cyan (d) red
  38. 38.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
  39. 39.🌈 In #000600 the green part is the hex number 06. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) red (d) blue

Answer key

  1. bright green
  2. magenta
  3. blue
  4. blue
  5. red
  6. F
  7. red
  8. cyan
  9. yellow
  10. 3
  11. red
  12. 14
  13. blue
  14. 28
  15. #00ff00
  16. #0000ff
  17. #000000
  18. 25
  19. 96
  20. green
  21. blue
  22. red
  23. 16
  24. 88
  25. green
  26. white
  27. magenta
  28. #00ffff
  29. red
  30. 89
  31. #ffffff
  32. 255
  33. red
  34. 133
  35. red
  36. 33
  37. red
  38. 235
  39. 6
  40. white

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