← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 164 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  2. 2.🌈 Which colour is #ff0000? (a) yellow (b) blue (c) red (d) bright green
  3. 3.🌈 In #009100 the green part is the hex number 91. What is it as a normal number?
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  5. 5.🌈 In #000300 the green part is the hex number 03. What is it as a normal number?
  6. 6.🌈 In #00a600 the green part is the hex number a6. What is it as a normal number?
  7. 7.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) bright green (c) magenta (d) yellow
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) red (d) magenta
  9. 9.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #ffffff
  10. 10.🌈 Which colour is #00ff00? (a) yellow (b) black (c) blue (d) bright green
  11. 11.🌈 Which colour of light is strongest in rgb(133, 153, 116)? (a) blue (b) green (c) red
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  13. 13.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
  14. 14.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffff00 (c) #ffffff (d) #0000ff
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  16. 16.🌈 In #008200 the green part is the hex number 82. What is it as a normal number?
  17. 17.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
  18. 18.🌈 In #9a0000 the red part is the hex number 9a. What is it as a normal number?
  19. 19.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
  20. 20.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) yellow (d) blue
  21. 21.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #ff00ff (d) #ffff00
  22. 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  23. 23.🌈 Which colour of light is strongest in rgb(202, 0, 137)? (a) red (b) blue (c) green
  24. 24.🌈 In #000093 the blue part is the hex number 93. What is it as a normal number?
  25. 25.🌈 Which colour is #ffffff? (a) black (b) yellow (c) white (d) blue
  26. 26.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #ffffff (d) #0000ff
  27. 27.🌈 Which colour of light is strongest in rgb(130, 85, 226)? (a) green (b) blue (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(99, 150, 57)? (a) blue (b) green (c) red
  29. 29.🌈 Which colour is #ff00ff? (a) bright green (b) black (c) magenta (d) red
  30. 30.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #ff0000 (d) #00ff00
  31. 31.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) red (d) magenta
  32. 32.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) yellow (c) white (d) magenta
  33. 33.🌈 In #2f0000 the red part is the hex number 2f. What is it as a normal number?
  34. 34.🌈 Which colour is #0000ff? (a) magenta (b) bright green (c) black (d) blue
  35. 35.🌈 Which colour is #000000? (a) black (b) yellow (c) magenta (d) bright green
  36. 36.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #ff00ff
  37. 37.🌈 Which colour of light is strongest in rgb(55, 113, 204)? (a) blue (b) green (c) red
  38. 38.🌈 In #0000f7 the blue part is the hex number f7. What is it as a normal number?
  39. 39.🌈 Which colour is #00ffff? (a) white (b) magenta (c) bright green (d) cyan
  40. 40.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #00ff00 (d) #ffff00

Answer key

  1. F
  2. red
  3. 145
  4. blue
  5. 3
  6. 166
  7. magenta
  8. cyan
  9. #ff00ff
  10. bright green
  11. green
  12. red
  13. 41
  14. #00ff00
  15. 255
  16. 130
  17. 3
  18. 154
  19. 146
  20. bright green
  21. #ffff00
  22. 3
  23. red
  24. 147
  25. white
  26. #ff0000
  27. blue
  28. green
  29. magenta
  30. #000000
  31. yellow
  32. blue
  33. 47
  34. blue
  35. black
  36. #0000ff
  37. blue
  38. 247
  39. cyan
  40. #ffffff

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