← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 70 · 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) F (c) G (d) Z
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  3. 3.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) magenta (c) black (d) red
  4. 4.🌈 Which colour is #00ffff? (a) blue (b) white (c) red (d) cyan
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  6. 6.🌈 In #002500 the green part is the hex number 25. What is it as a normal number?
  7. 7.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
  8. 8.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
  9. 9.🌈 Which hex code is red? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #ff0000
  10. 10.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) white (d) blue
  11. 11.🌈 Which colour of light is strongest in rgb(110, 187, 132)? (a) green (b) blue (c) red
  12. 12.🌈 In #000d00 the green part is the hex number 0d. What is it as a normal number?
  13. 13.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #00ffff
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  15. 15.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) magenta (d) white
  16. 16.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #00ff00
  17. 17.🌈 Which colour of light is strongest in rgb(0, 41, 158)? (a) red (b) blue (c) green
  18. 18.🌈 Which colour of light is strongest in rgb(162, 85, 111)? (a) blue (b) green (c) red
  19. 19.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
  20. 20.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
  21. 21.🌈 In #00fa00 the green part is the hex number fa. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(127, 22, 209)? (a) blue (b) red (c) green
  23. 23.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) white (c) cyan (d) magenta
  24. 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  25. 25.🌈 Which colour is #ff0000? (a) bright green (b) red (c) white (d) black
  26. 26.🌈 In #670000 the red part is the hex number 67. What is it as a normal number?
  27. 27.🌈 Which hex code is white? (a) #00ff00 (b) #ff00ff (c) #ffffff (d) #ff0000
  28. 28.🌈 Which colour is #ffffff? (a) red (b) yellow (c) blue (d) white
  29. 29.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #000000 (d) #00ff00
  30. 30.🌈 Which colour of light is strongest in rgb(179, 118, 138)? (a) green (b) red (c) blue
  31. 31.🌈 In #e20000 the red part is the hex number e2. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(13, 190, 132)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(170, 36, 23)? (a) blue (b) green (c) red
  34. 34.🌈 Which hex code is magenta? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ff0000
  35. 35.🌈 Which colour of light is strongest in rgb(36, 164, 121)? (a) red (b) green (c) blue
  36. 36.🌈 Which colour is #ffff00? (a) black (b) yellow (c) bright green (d) cyan
  37. 37.🌈 Which colour of light is strongest in rgb(245, 126, 45)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) white (d) red
  39. 39.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
  40. 40.🌈 In #000022 the blue part is the hex number 22. What is it as a normal number?

Answer key

  1. F
  2. blue
  3. magenta
  4. cyan
  5. 255
  6. 37
  7. 57
  8. 143
  9. #ff0000
  10. black
  11. green
  12. 13
  13. #00ffff
  14. red
  15. bright green
  16. #00ff00
  17. blue
  18. red
  19. 35
  20. 130
  21. 250
  22. blue
  23. cyan
  24. 3
  25. red
  26. 103
  27. #ffffff
  28. white
  29. #ffff00
  30. red
  31. 226
  32. green
  33. red
  34. #ff00ff
  35. green
  36. yellow
  37. red
  38. white
  39. 153
  40. 34

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