← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 101 · 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 #ffffff? (a) black (b) white (c) bright green (d) magenta
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  3. 3.🌈 Which hex code is black? (a) #00ff00 (b) #ffff00 (c) #ff00ff (d) #000000
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  5. 5.🌈 Which colour is #ffff00? (a) red (b) yellow (c) blue (d) white
  6. 6.🌈 Which colour of light is strongest in rgb(40, 115, 236)? (a) green (b) blue (c) red
  7. 7.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) magenta (d) yellow
  8. 8.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) black (c) magenta (d) red
  9. 9.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) black (c) blue (d) red
  10. 10.🌈 Which colour of light is strongest in rgb(109, 231, 22)? (a) green (b) red (c) blue
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  12. 12.🌈 Which hex code is white? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #00ff00
  13. 13.🌈 Which colour is #00ffff? (a) bright green (b) magenta (c) yellow (d) cyan
  14. 14.🌈 Which colour is #00ff00? (a) bright green (b) cyan (c) yellow (d) red
  15. 15.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) cyan (d) bright green
  16. 16.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) blue (c) cyan (d) black
  17. 17.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) white (c) blue (d) red
  18. 18.🌈 Which colour of light is strongest in rgb(2, 194, 40)? (a) red (b) blue (c) green
  19. 19.🌈 In #000061 the blue part is the hex number 61. What is it as a normal number?
  20. 20.🌈 Which colour of light is strongest in rgb(77, 211, 36)? (a) blue (b) green (c) red
  21. 21.🌈 Which colour is #0000ff? (a) blue (b) magenta (c) white (d) black
  22. 22.🌈 In #007b00 the green part is the hex number 7b. What is it as a normal number?
  23. 23.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  24. 24.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) yellow (d) blue
  25. 25.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ffff (d) #00ff00
  26. 26.🌈 In #1f0000 the red part is the hex number 1f. What is it as a normal number?
  27. 27.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #000000 (d) #0000ff
  28. 28.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  29. 29.🌈 Which colour is #ff0000? (a) black (b) red (c) magenta (d) blue
  30. 30.🌈 In #006d00 the green part is the hex number 6d. What is it as a normal number?
  31. 31.🌈 Which hex code is red? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #00ffff
  32. 32.🌈 In #0000b2 the blue part is the hex number b2. What is it as a normal number?
  33. 33.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
  34. 34.🌈 Which colour is #ff00ff? (a) white (b) red (c) magenta (d) cyan
  35. 35.🌈 Which colour of light is strongest in rgb(63, 73, 174)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour is #000000? (a) white (b) cyan (c) magenta (d) black
  37. 37.🌈 Which hex code is magenta? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #0000ff
  38. 38.🌈 Which colour of light is strongest in rgb(50, 161, 132)? (a) red (b) blue (c) green
  39. 39.🌈 Which colour of light is strongest in rgb(204, 90, 41)? (a) blue (b) green (c) red
  40. 40.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?

Answer key

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

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