← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 18 · 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 colour is #ff0000? (a) cyan (b) yellow (c) black (d) red
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  3. 3.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #000000
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  5. 5.🌈 Which colour of light is strongest in rgb(18, 1, 198)? (a) green (b) red (c) blue
  6. 6.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) white (d) cyan
  7. 7.🌈 Which hex code is black? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #000000
  8. 8.🌈 In #0000e3 the blue part is the hex number e3. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) blue (d) bright green
  10. 10.🌈 Which colour is #00ff00? (a) black (b) white (c) bright green (d) red
  11. 11.🌈 Which hex code is white? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ffff
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  13. 13.🌈 Which colour is #00ffff? (a) magenta (b) black (c) cyan (d) bright green
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) white (d) blue
  15. 15.🌈 Which hex code is blue? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #0000ff
  16. 16.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
  17. 17.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #ff00ff
  18. 18.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) black (d) white
  19. 19.🌈 Which colour of light is strongest in rgb(255, 32, 46)? (a) blue (b) green (c) red
  20. 20.🌈 In #2f0000 the red part is the hex number 2f. What is it as a normal number?
  21. 21.🌈 Which colour is #ffffff? (a) black (b) white (c) blue (d) bright green
  22. 22.🌈 In #00d000 the green part is the hex number d0. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(162, 123, 81)? (a) red (b) green (c) blue
  24. 24.🌈 Which colour of light is strongest in rgb(165, 133, 20)? (a) blue (b) red (c) green
  25. 25.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  26. 26.🌈 In #005a00 the green part is the hex number 5a. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(140, 166, 129)? (a) green (b) blue (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(246, 60, 103)? (a) green (b) blue (c) red
  29. 29.🌈 Which colour of light is strongest in rgb(27, 154, 46)? (a) red (b) green (c) blue
  30. 30.🌈 Which colour of light is strongest in rgb(83, 28, 180)? (a) red (b) green (c) blue
  31. 31.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) red (d) magenta
  32. 32.🌈 Which colour of light is strongest in rgb(200, 133, 91)? (a) green (b) blue (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(140, 210, 37)? (a) green (b) blue (c) red
  34. 34.🌈 Which colour is #000000? (a) white (b) magenta (c) bright green (d) black
  35. 35.🌈 Which colour is #ffff00? (a) magenta (b) yellow (c) cyan (d) white
  36. 36.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) yellow (d) cyan
  38. 38.🌈 Which colour of light is strongest in rgb(184, 95, 58)? (a) green (b) blue (c) red
  39. 39.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) white (d) black
  40. 40.🌈 Which colour of light is strongest in rgb(216, 27, 18)? (a) green (b) blue (c) red

Answer key

  1. red
  2. blue
  3. #ffff00
  4. 3
  5. blue
  6. cyan
  7. #000000
  8. 227
  9. white
  10. bright green
  11. #ffffff
  12. 255
  13. cyan
  14. blue
  15. #0000ff
  16. 178
  17. #00ffff
  18. yellow
  19. red
  20. 47
  21. white
  22. 208
  23. red
  24. red
  25. F
  26. 90
  27. green
  28. red
  29. green
  30. blue
  31. magenta
  32. red
  33. green
  34. black
  35. yellow
  36. red
  37. black
  38. red
  39. bright green
  40. red

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