← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 310 · 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 #00a200 the green part is the hex number a2. What is it as a normal number?
  2. 2.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  4. 4.🌈 In #000600 the green part is the hex number 06. What is it as a normal number?
  5. 5.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) bright green (d) cyan
  6. 6.🌈 Which hex code is black? (a) #ffffff (b) #ff0000 (c) #000000 (d) #ff00ff
  7. 7.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) white (d) red
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  9. 9.🌈 Which colour of light is strongest in rgb(245, 7, 69)? (a) blue (b) red (c) green
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  11. 11.🌈 Which hex code is magenta? (a) #0000ff (b) #ffff00 (c) #00ffff (d) #ff00ff
  12. 12.🌈 Which colour is #ff00ff? (a) blue (b) red (c) bright green (d) magenta
  13. 13.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) red (d) blue
  14. 14.🌈 Which colour is #00ff00? (a) magenta (b) red (c) bright green (d) cyan
  15. 15.🌈 Which colour of light is strongest in rgb(169, 75, 63)? (a) green (b) blue (c) red
  16. 16.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) bright green (d) red
  17. 17.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ff0000
  18. 18.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) blue (c) yellow (d) bright green
  19. 19.🌈 In #000000 the green part is the hex number 00. What is it as a normal number?
  20. 20.🌈 In #005d00 the green part is the hex number 5d. What is it as a normal number?
  21. 21.🌈 Which colour is #ffffff? (a) white (b) magenta (c) black (d) cyan
  22. 22.🌈 Which hex code is cyan? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #00ffff
  23. 23.🌈 Which colour is #ff0000? (a) red (b) cyan (c) magenta (d) bright green
  24. 24.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
  25. 25.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
  26. 26.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  27. 27.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) bright green (c) black (d) magenta
  28. 28.🌈 In #870000 the red part is the hex number 87. What is it as a normal number?
  29. 29.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  30. 30.🌈 Which colour is #0000ff? (a) white (b) cyan (c) black (d) blue
  31. 31.🌈 In #00009a the blue part is the hex number 9a. What is it as a normal number?
  32. 32.🌈 In #0000c1 the blue part is the hex number c1. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(226, 64, 85)? (a) green (b) red (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(125, 4, 176)? (a) blue (b) green (c) red
  35. 35.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(108, 132, 222)? (a) green (b) red (c) blue
  37. 37.🌈 In #1a0000 the red part is the hex number 1a. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(10, 246, 63)? (a) red (b) green (c) blue
  39. 39.🌈 In #00003c the blue part is the hex number 3c. What is it as a normal number?
  40. 40.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?

Answer key

  1. 162
  2. 45
  3. blue
  4. 6
  5. bright green
  6. #000000
  7. yellow
  8. red
  9. red
  10. F
  11. #ff00ff
  12. magenta
  13. blue
  14. bright green
  15. red
  16. cyan
  17. #00ff00
  18. yellow
  19. 0
  20. 93
  21. white
  22. #00ffff
  23. red
  24. 161
  25. 169
  26. 3
  27. magenta
  28. 135
  29. 255
  30. blue
  31. 154
  32. 193
  33. red
  34. blue
  35. 147
  36. blue
  37. 26
  38. green
  39. 60
  40. 211

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