← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 267 · 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) Z (c) G (d) F
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  3. 3.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #ff00ff (d) #ff0000
  4. 4.🌈 Which colour of light is strongest in rgb(246, 27, 129)? (a) red (b) green (c) blue
  5. 5.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
  6. 6.🌈 Which colour is #ff00ff? (a) blue (b) red (c) magenta (d) black
  7. 7.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) yellow (d) white
  8. 8.🌈 Which colour of light is strongest in rgb(53, 54, 203)? (a) red (b) blue (c) green
  9. 9.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) red (c) bright green (d) magenta
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  11. 11.🌈 In #000900 the green part is the hex number 09. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) white (d) bright green
  13. 13.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) red (d) magenta
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  15. 15.🌈 Which colour of light is strongest in rgb(229, 4, 11)? (a) green (b) blue (c) red
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) bright green (c) blue (d) yellow
  17. 17.🌈 In #007600 the green part is the hex number 76. What is it as a normal number?
  18. 18.🌈 Which colour is #ffff00? (a) yellow (b) magenta (c) black (d) cyan
  19. 19.🌈 Which colour of light is strongest in rgb(31, 153, 12)? (a) blue (b) red (c) green
  20. 20.🌈 Which colour of light is strongest in rgb(158, 85, 49)? (a) green (b) red (c) blue
  21. 21.🌈 Which colour of light is strongest in rgb(201, 24, 19)? (a) red (b) green (c) blue
  22. 22.🌈 Which colour is #ff0000? (a) red (b) white (c) blue (d) black
  23. 23.🌈 Which colour is #0000ff? (a) cyan (b) red (c) magenta (d) blue
  24. 24.🌈 Which colour of light is strongest in rgb(55, 63, 175)? (a) blue (b) green (c) red
  25. 25.🌈 In #6c0000 the red part is the hex number 6c. What is it as a normal number?
  26. 26.🌈 Which colour is #ffffff? (a) red (b) white (c) black (d) yellow
  27. 27.🌈 Which colour of light is strongest in rgb(45, 124, 229)? (a) blue (b) red (c) green
  28. 28.🌈 Which colour of light is strongest in rgb(100, 125, 252)? (a) blue (b) green (c) red
  29. 29.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #00ff00 (d) #000000
  30. 30.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  31. 31.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #00ffff (d) #00ff00
  32. 32.🌈 Which colour of light is strongest in rgb(87, 28, 184)? (a) red (b) blue (c) green
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) bright green (c) black (d) white
  34. 34.🌈 Which colour is #000000? (a) black (b) yellow (c) white (d) red
  35. 35.🌈 Which colour of light is strongest in rgb(219, 87, 130)? (a) green (b) blue (c) red
  36. 36.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ffff00
  37. 37.🌈 Which hex code is red? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #000000
  38. 38.🌈 In #000036 the blue part is the hex number 36. What is it as a normal number?
  39. 39.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) cyan (c) black (d) bright green
  40. 40.🌈 Which colour of light is strongest in rgb(18, 60, 194)? (a) green (b) red (c) blue

Answer key

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

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