← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 366 · 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 last two digits give? (a) red (b) green (c) white (d) blue
  2. 2.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #ff00ff (d) #ff0000
  3. 3.🌈 Which colour is #ff0000? (a) black (b) yellow (c) red (d) blue
  4. 4.🌈 Which colour is #000000? (a) black (b) cyan (c) red (d) bright green
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  6. 6.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) yellow (c) bright green (d) white
  7. 7.🌈 In #6e0000 the red part is the hex number 6e. What is it as a normal number?
  8. 8.🌈 In #00008c the blue part is the hex number 8c. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) blue (c) black (d) red
  10. 10.🌈 Which colour of light is strongest in rgb(174, 16, 31)? (a) blue (b) red (c) green
  11. 11.🌈 Which colour of light is strongest in rgb(108, 158, 19)? (a) blue (b) green (c) red
  12. 12.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff0000
  13. 13.🌈 Which colour is #00ff00? (a) bright green (b) black (c) blue (d) yellow
  14. 14.🌈 Which colour of light is strongest in rgb(79, 17, 249)? (a) red (b) green (c) blue
  15. 15.🌈 Which hex code is blue? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #0000ff
  16. 16.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) red (d) yellow
  17. 17.🌈 Which colour of light is strongest in rgb(15, 219, 107)? (a) blue (b) red (c) green
  18. 18.🌈 Which colour is #ffff00? (a) yellow (b) white (c) bright green (d) red
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  21. 21.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) cyan (c) bright green (d) red
  22. 22.🌈 In #0000d3 the blue part is the hex number d3. What is it as a normal number?
  23. 23.🌈 Which colour is #ffffff? (a) cyan (b) white (c) magenta (d) red
  24. 24.🌈 Which hex code is magenta? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #ff00ff
  25. 25.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
  26. 26.🌈 Which hex code is yellow? (a) #ffffff (b) #0000ff (c) #ffff00 (d) #ff00ff
  27. 27.🌈 In #00c500 the green part is the hex number c5. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(193, 115, 20)? (a) blue (b) green (c) red
  29. 29.🌈 Which colour is #ff00ff? (a) black (b) magenta (c) yellow (d) bright green
  30. 30.🌈 In #aa0000 the red part is the hex number aa. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(238, 24, 48)? (a) red (b) green (c) blue
  32. 32.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(8, 195, 10)? (a) green (b) red (c) blue
  34. 34.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(173, 108, 70)? (a) blue (b) green (c) red
  36. 36.🌈 In #00a100 the green part is the hex number a1. What is it as a normal number?
  37. 37.🌈 Which hex code is cyan? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #00ffff
  38. 38.🌈 In #4e0000 the red part is the hex number 4e. What is it as a normal number?
  39. 39.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  40. 40.🌈 In #540000 the red part is the hex number 54. What is it as a normal number?

Answer key

  1. blue
  2. #00ff00
  3. red
  4. black
  5. F
  6. white
  7. 110
  8. 140
  9. black
  10. red
  11. green
  12. #ffffff
  13. bright green
  14. blue
  15. #0000ff
  16. cyan
  17. green
  18. yellow
  19. 255
  20. red
  21. bright green
  22. 211
  23. white
  24. #ff00ff
  25. 37
  26. #ffff00
  27. 197
  28. red
  29. magenta
  30. 170
  31. red
  32. 195
  33. green
  34. 145
  35. red
  36. 161
  37. #00ffff
  38. 78
  39. 3
  40. 84

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