← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 59 · 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) F (b) G (c) J (d) Z
  2. 2.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) blue (d) bright green
  3. 3.🌈 Which colour of light is strongest in rgb(0, 52, 226)? (a) blue (b) green (c) red
  4. 4.🌈 In #0000a0 the blue part is the hex number a0. What is it as a normal number?
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  6. 6.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #0000ff
  7. 7.🌈 Which colour of light is strongest in rgb(109, 170, 5)? (a) red (b) green (c) blue
  8. 8.🌈 In #00009e the blue part is the hex number 9e. What is it as a normal number?
  9. 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  10. 10.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #0000ff
  11. 11.🌈 Which colour of light is strongest in rgb(90, 172, 140)? (a) red (b) blue (c) green
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  13. 13.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  14. 14.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) magenta (d) cyan
  15. 15.🌈 Which colour of light is strongest in rgb(219, 61, 6)? (a) red (b) blue (c) green
  16. 16.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
  17. 17.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #ff0000
  18. 18.🌈 Which colour is #ff0000? (a) red (b) bright green (c) white (d) blue
  19. 19.🌈 Which colour of light is strongest in rgb(230, 84, 140)? (a) red (b) green (c) blue
  20. 20.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) white (d) red
  21. 21.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) bright green (d) black
  22. 22.🌈 Which colour of light is strongest in rgb(90, 113, 233)? (a) green (b) red (c) blue
  23. 23.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
  24. 24.🌈 In #e40000 the red part is the hex number e4. What is it as a normal number?
  25. 25.🌈 Which hex code is bright green? (a) #ffffff (b) #ff0000 (c) #ffff00 (d) #00ff00
  26. 26.🌈 Which colour of light is strongest in rgb(127, 75, 236)? (a) red (b) blue (c) green
  27. 27.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) bright green (d) red
  28. 28.🌈 Which colour of light is strongest in rgb(66, 173, 17)? (a) red (b) green (c) blue
  29. 29.🌈 Which colour of light is strongest in rgb(119, 183, 90)? (a) green (b) blue (c) red
  30. 30.🌈 Which colour is #00ffff? (a) white (b) black (c) bright green (d) cyan
  31. 31.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) red (c) cyan (d) bright green
  32. 32.🌈 In #0000cc the blue part is the hex number cc. What is it as a normal number?
  33. 33.🌈 In #00c100 the green part is the hex number c1. What is it as a normal number?
  34. 34.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #00ff00 (d) #0000ff
  35. 35.🌈 Which colour of light is strongest in rgb(23, 159, 24)? (a) green (b) blue (c) red
  36. 36.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) bright green (d) red
  37. 37.🌈 In #005700 the green part is the hex number 57. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(171, 136, 16)? (a) green (b) blue (c) red
  39. 39.🌈 In #001900 the green part is the hex number 19. What is it as a normal number?
  40. 40.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?

Answer key

  1. F
  2. yellow
  3. blue
  4. 160
  5. blue
  6. #ff0000
  7. green
  8. 158
  9. 3
  10. #ffffff
  11. green
  12. red
  13. 255
  14. cyan
  15. red
  16. 50
  17. #ffff00
  18. red
  19. red
  20. bright green
  21. magenta
  22. blue
  23. 147
  24. 228
  25. #00ff00
  26. blue
  27. white
  28. green
  29. green
  30. cyan
  31. bright green
  32. 204
  33. 193
  34. #ff00ff
  35. green
  36. blue
  37. 87
  38. red
  39. 25
  40. 9

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