← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 126 · 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 #000000? (a) black (b) yellow (c) white (d) red
  2. 2.🌈 Which colour of light is strongest in rgb(216, 12, 110)? (a) green (b) blue (c) red
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) white (d) yellow
  4. 4.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ff0000
  5. 5.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
  6. 6.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) magenta (d) red
  7. 7.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  9. 9.🌈 Which colour of light is strongest in rgb(1, 230, 132)? (a) red (b) green (c) blue
  10. 10.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) yellow (c) cyan (d) white
  11. 11.🌈 In #bf0000 the red part is the hex number bf. What is it as a normal number?
  12. 12.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #000000
  13. 13.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
  14. 14.🌈 Which colour of light is strongest in rgb(87, 113, 192)? (a) green (b) red (c) blue
  15. 15.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  16. 16.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ff00ff
  17. 17.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) black (d) yellow
  18. 18.🌈 Which colour of light is strongest in rgb(150, 117, 112)? (a) green (b) blue (c) red
  19. 19.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  20. 20.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) blue (d) white
  21. 21.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
  22. 22.🌈 Which colour is #00ff00? (a) bright green (b) white (c) magenta (d) red
  23. 23.🌈 In #007700 the green part is the hex number 77. What is it as a normal number?
  24. 24.🌈 Which colour is #ffff00? (a) yellow (b) black (c) red (d) white
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) red (d) blue
  26. 26.🌈 Which colour is #ffffff? (a) red (b) white (c) blue (d) black
  27. 27.🌈 Which colour of light is strongest in rgb(169, 17, 126)? (a) green (b) blue (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(99, 20, 252)? (a) blue (b) green (c) red
  29. 29.🌈 Which colour of light is strongest in rgb(162, 37, 39)? (a) green (b) blue (c) red
  30. 30.🌈 In #00003c the blue part is the hex number 3c. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(232, 72, 84)? (a) blue (b) red (c) green
  32. 32.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  33. 33.🌈 Which colour of light is strongest in rgb(8, 31, 150)? (a) blue (b) red (c) green
  34. 34.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) cyan (c) red (d) bright green
  35. 35.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) black (c) white (d) cyan
  36. 36.🌈 In #c80000 the red part is the hex number c8. What is it as a normal number?
  37. 37.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
  38. 38.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  39. 39.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) white (c) red (d) magenta
  40. 40.🌈 Which hex code is blue? (a) #00ff00 (b) #ffffff (c) #000000 (d) #0000ff

Answer key

  1. black
  2. red
  3. cyan
  4. #000000
  5. 37
  6. yellow
  7. 1
  8. F
  9. green
  10. bright green
  11. 191
  12. #ffffff
  13. 127
  14. blue
  15. 3
  16. #00ff00
  17. blue
  18. red
  19. red
  20. cyan
  21. 145
  22. bright green
  23. 119
  24. yellow
  25. black
  26. white
  27. red
  28. blue
  29. red
  30. 60
  31. red
  32. 255
  33. blue
  34. red
  35. white
  36. 200
  37. 196
  38. blue
  39. magenta
  40. #0000ff

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