← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 194 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) red (c) cyan (d) black
  3. 3.🌈 Which colour of light is strongest in rgb(93, 219, 127)? (a) blue (b) red (c) green
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  5. 5.🌈 Which colour is #000000? (a) magenta (b) white (c) black (d) red
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  7. 7.🌈 Which colour of light is strongest in rgb(8, 160, 98)? (a) blue (b) green (c) red
  8. 8.🌈 In #009000 the green part is the hex number 90. What is it as a normal number?
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  10. 10.🌈 Which colour of light is strongest in rgb(208, 37, 122)? (a) blue (b) green (c) red
  11. 11.🌈 Which colour is #0000ff? (a) red (b) white (c) magenta (d) blue
  12. 12.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #000000
  13. 13.🌈 Which colour is #ffffff? (a) bright green (b) blue (c) white (d) red
  14. 14.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) blue
  15. 15.🌈 In #00c400 the green part is the hex number c4. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(182, 25, 134)? (a) blue (b) green (c) red
  17. 17.🌈 In #001300 the green part is the hex number 13. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(245, 20, 138)? (a) red (b) blue (c) green
  19. 19.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) magenta (c) red (d) bright green
  20. 20.🌈 Which colour of light is strongest in rgb(175, 129, 36)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is #ffff00? (a) black (b) bright green (c) red (d) yellow
  22. 22.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) yellow (d) white
  23. 23.🌈 Which colour of light is strongest in rgb(158, 102, 134)? (a) green (b) blue (c) red
  24. 24.🌈 In #000a00 the green part is the hex number 0a. What is it as a normal number?
  25. 25.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
  26. 26.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
  27. 27.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) white (d) blue
  28. 28.🌈 Which hex code is blue? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #0000ff
  29. 29.🌈 In #00003d the blue part is the hex number 3d. What is it as a normal number?
  30. 30.🌈 In #00de00 the green part is the hex number de. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(50, 61, 157)? (a) blue (b) red (c) green
  32. 32.🌈 Which colour of light is strongest in rgb(202, 110, 94)? (a) green (b) red (c) blue
  33. 33.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) bright green (c) magenta (d) white
  34. 34.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(24, 95, 191)? (a) red (b) green (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(45, 55, 242)? (a) green (b) red (c) blue
  37. 37.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ffff (c) #00ff00 (d) #000000
  38. 38.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?
  39. 39.🌈 In #5a0000 the red part is the hex number 5a. What is it as a normal number?
  40. 40.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?

Answer key

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

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