← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 20 · 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.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) bright green (d) red
  3. 3.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) red (d) blue
  4. 4.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) blue (c) magenta (d) cyan
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  6. 6.🌈 In #000016 the blue part is the hex number 16. What is it as a normal number?
  7. 7.🌈 Which colour of light is strongest in rgb(92, 218, 3)? (a) red (b) blue (c) green
  8. 8.🌈 Which colour is #ffffff? (a) blue (b) black (c) yellow (d) white
  9. 9.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) yellow (d) white
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  11. 11.🌈 In #00009c the blue part is the hex number 9c. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(188, 122, 23)? (a) blue (b) red (c) green
  13. 13.🌈 Which colour is #000000? (a) black (b) bright green (c) white (d) magenta
  14. 14.🌈 Which colour of light is strongest in rgb(12, 130, 205)? (a) red (b) green (c) blue
  15. 15.🌈 Which colour of light is strongest in rgb(71, 245, 106)? (a) green (b) red (c) blue
  16. 16.🌈 Which hex code is yellow? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #ffff00
  17. 17.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) blue (c) cyan (d) bright green
  18. 18.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  19. 19.🌈 Which colour is #00ffff? (a) bright green (b) magenta (c) cyan (d) white
  20. 20.🌈 Which colour is #ff0000? (a) cyan (b) magenta (c) white (d) red
  21. 21.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
  22. 22.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #00ffff
  23. 23.🌈 In #00ca00 the green part is the hex number ca. What is it as a normal number?
  24. 24.🌈 Which colour is #ff00ff? (a) yellow (b) red (c) magenta (d) bright green
  25. 25.🌈 Which colour is #00ff00? (a) blue (b) red (c) bright green (d) white
  26. 26.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) cyan (d) white
  28. 28.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #ffffff (d) #ff0000
  29. 29.🌈 Which colour of light is strongest in rgb(109, 241, 75)? (a) blue (b) red (c) green
  30. 30.🌈 Which colour is #ffff00? (a) red (b) yellow (c) black (d) bright green
  31. 31.🌈 Which colour of light is strongest in rgb(55, 99, 249)? (a) red (b) green (c) blue
  32. 32.🌈 Which colour of light is strongest in rgb(251, 77, 128)? (a) red (b) green (c) blue
  33. 33.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(88, 193, 93)? (a) blue (b) red (c) green
  35. 35.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #ffffff (d) #ffff00
  36. 36.🌈 In #003c00 the green part is the hex number 3c. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) white (c) magenta (d) cyan
  38. 38.🌈 Which colour of light is strongest in rgb(178, 121, 80)? (a) red (b) blue (c) green
  39. 39.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #00ff00 (d) #000000
  40. 40.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #ffff00 (d) #ff0000

Answer key

  1. red
  2. black
  3. white
  4. magenta
  5. 3
  6. 22
  7. green
  8. white
  9. blue
  10. F
  11. 156
  12. red
  13. black
  14. blue
  15. green
  16. #ffff00
  17. cyan
  18. blue
  19. cyan
  20. red
  21. 45
  22. #00ff00
  23. 202
  24. magenta
  25. bright green
  26. 126
  27. bright green
  28. #ff00ff
  29. green
  30. yellow
  31. blue
  32. red
  33. 115
  34. green
  35. #0000ff
  36. 60
  37. red
  38. red
  39. #00ffff
  40. #000000

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