← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 64 · 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 bright green? (a) #00ffff (b) #ff00ff (c) #00ff00 (d) #0000ff
  2. 2.🌈 Which colour is #0000ff? (a) magenta (b) red (c) black (d) blue
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) black (c) bright green (d) yellow
  4. 4.🌈 Which colour of light is strongest in rgb(106, 96, 188)? (a) green (b) blue (c) red
  5. 5.🌈 In #000099 the blue part is the hex number 99. What is it as a normal number?
  6. 6.🌈 Which colour is #ff0000? (a) red (b) blue (c) bright green (d) white
  7. 7.🌈 Which colour is #000000? (a) blue (b) magenta (c) black (d) white
  8. 8.🌈 In #002000 the green part is the hex number 20. What is it as a normal number?
  9. 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  11. 11.🌈 In #700000 the red part is the hex number 70. What is it as a normal number?
  12. 12.🌈 In #d70000 the red part is the hex number d7. What is it as a normal number?
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  14. 14.🌈 Which colour of light is strongest in rgb(110, 104, 225)? (a) green (b) blue (c) red
  15. 15.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) blue (d) white
  16. 16.🌈 Which colour of light is strongest in rgb(70, 176, 65)? (a) blue (b) green (c) red
  17. 17.🌈 Which hex code is black? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #ffffff
  18. 18.🌈 Which hex code is cyan? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #00ffff
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) bright green (d) red
  20. 20.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) white (d) magenta
  21. 21.🌈 Which colour of light is strongest in rgb(162, 0, 38)? (a) green (b) blue (c) red
  22. 22.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) blue (d) cyan
  23. 23.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) cyan (c) bright green (d) magenta
  24. 24.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) white (d) red
  25. 25.🌈 Which colour is #ffff00? (a) magenta (b) black (c) cyan (d) yellow
  26. 26.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #000000 (d) #ff00ff
  27. 27.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  28. 28.🌈 In #000030 the blue part is the hex number 30. What is it as a normal number?
  29. 29.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) bright green (c) yellow (d) white
  30. 30.🌈 In #000046 the blue part is the hex number 46. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(83, 29, 232)? (a) green (b) blue (c) red
  32. 32.🌈 Which colour of light is strongest in rgb(104, 93, 242)? (a) green (b) blue (c) red
  33. 33.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #000000
  34. 34.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #ff0000 (d) #00ffff
  35. 35.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) yellow (d) red
  36. 36.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) black (d) white
  37. 37.🌈 In #001800 the green part is the hex number 18. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(28, 225, 92)? (a) blue (b) green (c) red
  39. 39.🌈 Which hex code is magenta? (a) #000000 (b) #ffffff (c) #ff00ff (d) #0000ff
  40. 40.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?

Answer key

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

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