← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 104 · 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 #060000 the red part is the hex number 06. What is it as a normal number?
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  3. 3.🌈 Which hex code is bright green? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #0000ff
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  5. 5.🌈 Which colour of light is strongest in rgb(30, 224, 108)? (a) blue (b) red (c) green
  6. 6.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #00ffff (d) #ffff00
  7. 7.🌈 Which hex code is red? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #0000ff
  8. 8.🌈 Which colour is #000000? (a) red (b) white (c) black (d) yellow
  9. 9.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) cyan (d) magenta
  10. 10.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) red (d) cyan
  11. 11.🌈 Which hex code is blue? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #0000ff
  12. 12.🌈 Which colour is #00ffff? (a) yellow (b) magenta (c) cyan (d) blue
  13. 13.🌈 Which colour is #00ff00? (a) red (b) blue (c) bright green (d) cyan
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  15. 15.🌈 In #00ad00 the green part is the hex number ad. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) red (c) black (d) bright green
  17. 17.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
  18. 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  19. 19.🌈 Which colour is #ff0000? (a) black (b) cyan (c) blue (d) red
  20. 20.🌈 Which colour of light is strongest in rgb(133, 219, 88)? (a) green (b) blue (c) red
  21. 21.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  22. 22.🌈 Which colour is #ffffff? (a) white (b) magenta (c) black (d) cyan
  23. 23.🌈 Which colour of light is strongest in rgb(223, 104, 12)? (a) red (b) green (c) blue
  24. 24.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) black (d) white
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) magenta (d) cyan
  26. 26.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) red (d) black
  27. 27.🌈 In #009700 the green part is the hex number 97. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(57, 45, 243)? (a) red (b) blue (c) green
  29. 29.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) magenta (c) red (d) cyan
  30. 30.🌈 In #000000 the green part is the hex number 00. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) blue (c) bright green (d) cyan
  32. 32.🌈 Which colour of light is strongest in rgb(106, 15, 193)? (a) blue (b) red (c) green
  33. 33.🌈 Which colour of light is strongest in rgb(23, 125, 176)? (a) red (b) green (c) blue
  34. 34.🌈 In #00dc00 the green part is the hex number dc. What is it as a normal number?
  35. 35.🌈 Which hex code is cyan? (a) #ffffff (b) #000000 (c) #00ff00 (d) #00ffff
  36. 36.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) bright green (c) magenta (d) white
  37. 37.🌈 Which colour of light is strongest in rgb(218, 120, 9)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour is #ffff00? (a) blue (b) black (c) magenta (d) yellow
  39. 39.🌈 Which colour of light is strongest in rgb(243, 31, 17)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(216, 131, 17)? (a) red (b) green (c) blue

Answer key

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

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