← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 71 · 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) green (b) red (c) blue (d) black
  2. 2.🌈 Which colour of light is strongest in rgb(150, 131, 108)? (a) blue (b) red (c) green
  3. 3.🌈 Which colour is #ff00ff? (a) cyan (b) red (c) yellow (d) magenta
  4. 4.🌈 Which colour of light is strongest in rgb(32, 176, 0)? (a) blue (b) red (c) green
  5. 5.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ff00ff
  6. 6.🌈 Which colour is #ffff00? (a) yellow (b) black (c) blue (d) red
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  8. 8.🌈 Which hex code is white? (a) #000000 (b) #00ff00 (c) #ff0000 (d) #ffffff
  9. 9.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #ffffff (d) #0000ff
  10. 10.🌈 Which hex code is bright green? (a) #000000 (b) #00ffff (c) #00ff00 (d) #ffffff
  11. 11.🌈 In #6d0000 the red part is the hex number 6d. What is it as a normal number?
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  13. 13.🌈 Which colour is #ff0000? (a) cyan (b) yellow (c) red (d) white
  14. 14.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #0000ff (d) #ffff00
  15. 15.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(233, 123, 139)? (a) blue (b) red (c) green
  17. 17.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) bright green (d) black
  18. 18.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) red (c) black (d) bright green
  19. 19.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) blue (d) black
  20. 20.🌈 Which colour of light is strongest in rgb(233, 130, 38)? (a) red (b) green (c) blue
  21. 21.🌈 Which colour is #00ff00? (a) red (b) cyan (c) white (d) bright green
  22. 22.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
  23. 23.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  24. 24.🌈 In #007800 the green part is the hex number 78. What is it as a normal number?
  25. 25.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #ffffff
  26. 26.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(152, 47, 129)? (a) blue (b) green (c) red
  28. 28.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
  29. 29.🌈 In #00006f the blue part is the hex number 6f. What is it as a normal number?
  30. 30.🌈 Which hex code is red? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #ff0000
  31. 31.🌈 Which colour of light is strongest in rgb(38, 235, 83)? (a) green (b) red (c) blue
  32. 32.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  33. 33.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) bright green (d) red
  34. 34.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) cyan (c) yellow (d) bright green
  35. 35.🌈 In #940000 the red part is the hex number 94. What is it as a normal number?
  36. 36.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) magenta (c) black (d) yellow
  38. 38.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(166, 79, 17)? (a) blue (b) green (c) red
  40. 40.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?

Answer key

  1. red
  2. red
  3. magenta
  4. green
  5. #ff00ff
  6. yellow
  7. 3
  8. #ffffff
  9. #0000ff
  10. #00ff00
  11. 109
  12. blue
  13. red
  14. #ffff00
  15. 32
  16. red
  17. blue
  18. bright green
  19. white
  20. red
  21. bright green
  22. 71
  23. 255
  24. 120
  25. #00ffff
  26. 12
  27. red
  28. 24
  29. 111
  30. #ff0000
  31. green
  32. F
  33. blue
  34. red
  35. 148
  36. 19
  37. black
  38. 22
  39. red
  40. 161

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