← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 277 · 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 hex code is white? (a) #ff00ff (b) #000000 (c) #00ff00 (d) #ffffff
  2. 2.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
  3. 3.🌈 Which colour of light is strongest in rgb(85, 180, 28)? (a) green (b) red (c) blue
  4. 4.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) yellow (c) blue (d) black
  5. 5.🌈 In #003600 the green part is the hex number 36. What is it as a normal number?
  6. 6.🌈 Which hex code is red? (a) #0000ff (b) #ffff00 (c) #000000 (d) #ff0000
  7. 7.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) black (d) red
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  9. 9.🌈 In #00c100 the green part is the hex number c1. What is it as a normal number?
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  11. 11.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #ffff00
  12. 12.🌈 Which colour of light is strongest in rgb(126, 127, 255)? (a) red (b) blue (c) green
  13. 13.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ff00 (c) #000000 (d) #00ffff
  14. 14.🌈 Which colour is #ff0000? (a) yellow (b) red (c) cyan (d) black
  15. 15.🌈 Which colour is #0000ff? (a) yellow (b) bright green (c) cyan (d) blue
  16. 16.🌈 Which colour is #00ff00? (a) yellow (b) red (c) black (d) bright green
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) magenta (c) red (d) bright green
  18. 18.🌈 Which colour of light is strongest in rgb(153, 133, 67)? (a) red (b) green (c) blue
  19. 19.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) blue (d) bright green
  20. 20.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #ff00ff (d) #ffff00
  21. 21.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) white (d) black
  22. 22.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  23. 23.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) cyan (c) magenta (d) black
  24. 24.🌈 Which colour is #ffff00? (a) bright green (b) yellow (c) black (d) blue
  25. 25.🌈 Which colour of light is strongest in rgb(55, 56, 202)? (a) blue (b) green (c) red
  26. 26.🌈 Which colour of light is strongest in rgb(83, 71, 155)? (a) green (b) blue (c) red
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  28. 28.🌈 Which colour of light is strongest in rgb(85, 234, 8)? (a) green (b) red (c) blue
  29. 29.🌈 Which hex code is magenta? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #ffffff
  30. 30.🌈 In #000025 the blue part is the hex number 25. What is it as a normal number?
  31. 31.🌈 Which colour is #000000? (a) white (b) magenta (c) yellow (d) black
  32. 32.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  33. 33.🌈 Which colour of light is strongest in rgb(174, 50, 135)? (a) blue (b) green (c) red
  34. 34.🌈 Which colour of light is strongest in rgb(104, 211, 128)? (a) blue (b) green (c) red
  35. 35.🌈 Which colour of light is strongest in rgb(3, 26, 242)? (a) blue (b) green (c) red
  36. 36.🌈 Which colour is #ffffff? (a) yellow (b) red (c) white (d) bright green
  37. 37.🌈 Which colour is #00ffff? (a) black (b) yellow (c) white (d) cyan
  38. 38.🌈 Which colour is #ff00ff? (a) magenta (b) blue (c) red (d) cyan
  39. 39.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
  40. 40.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?

Answer key

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

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