← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 272 · 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 hex code is magenta? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
  2. 2.🌈 In #660000 the red part is the hex number 66. What is it as a normal number?
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) red (c) cyan (d) yellow
  5. 5.🌈 In #001600 the green part is the hex number 16. What is it as a normal number?
  6. 6.🌈 Which colour is #000000? (a) black (b) blue (c) red (d) magenta
  7. 7.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) blue (d) black
  8. 8.🌈 Which hex code is white? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ffffff
  9. 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  10. 10.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  12. 12.🌈 In #000067 the blue part is the hex number 67. What is it as a normal number?
  13. 13.🌈 In #000064 the blue part is the hex number 64. What is it as a normal number?
  14. 14.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
  15. 15.🌈 Which colour is #ff0000? (a) magenta (b) black (c) bright green (d) red
  16. 16.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) black (d) blue
  17. 17.🌈 In #000099 the blue part is the hex number 99. What is it as a normal number?
  18. 18.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) cyan (d) blue
  19. 19.🌈 Which colour of light is strongest in rgb(173, 102, 130)? (a) green (b) blue (c) red
  20. 20.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) magenta (c) bright green (d) yellow
  21. 21.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
  22. 22.🌈 Which colour is #ffff00? (a) cyan (b) magenta (c) yellow (d) bright green
  23. 23.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) bright green (d) blue
  24. 24.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  25. 25.🌈 In #00004e the blue part is the hex number 4e. What is it as a normal number?
  26. 26.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  27. 27.🌈 Which colour is #ffffff? (a) white (b) magenta (c) yellow (d) red
  28. 28.🌈 Which hex code is blue? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #0000ff
  29. 29.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(125, 133, 200)? (a) blue (b) green (c) red
  31. 31.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #00ffff
  32. 32.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) black (d) blue
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) magenta (d) yellow
  34. 34.🌈 In #00ea00 the green part is the hex number ea. What is it as a normal number?
  35. 35.🌈 In #e70000 the red part is the hex number e7. What is it as a normal number?
  36. 36.🌈 Which hex code is yellow? (a) #ff00ff (b) #0000ff (c) #ffff00 (d) #00ff00
  37. 37.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
  38. 38.🌈 In #00a000 the green part is the hex number a0. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(207, 91, 127)? (a) blue (b) green (c) red
  40. 40.🌈 Which hex code is bright green? (a) #000000 (b) #0000ff (c) #00ff00 (d) #ff0000

Answer key

  1. #ff00ff
  2. 102
  3. 255
  4. yellow
  5. 22
  6. black
  7. blue
  8. #ffffff
  9. 3
  10. 133
  11. red
  12. 103
  13. 100
  14. 102
  15. red
  16. blue
  17. 153
  18. white
  19. red
  20. magenta
  21. 18
  22. yellow
  23. red
  24. F
  25. 78
  26. blue
  27. white
  28. #0000ff
  29. 67
  30. blue
  31. #ff0000
  32. bright green
  33. cyan
  34. 234
  35. 231
  36. #ffff00
  37. 105
  38. 160
  39. red
  40. #00ff00

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