← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 225 · 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 rgb(255, 0, 0)? (a) black (b) cyan (c) red (d) bright green
  2. 2.🌈 Which colour is #ff0000? (a) black (b) red (c) bright green (d) cyan
  3. 3.🌈 In #000700 the green part is the hex number 07. What is it as a normal number?
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) magenta (c) yellow (d) red
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  6. 6.🌈 Which colour is #ffffff? (a) blue (b) red (c) white (d) magenta
  7. 7.🌈 In #00008b the blue part is the hex number 8b. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) yellow (c) red (d) white
  9. 9.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
  10. 10.🌈 Which colour is #00ff00? (a) blue (b) cyan (c) red (d) bright green
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  12. 12.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) cyan (d) yellow
  13. 13.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  15. 15.🌈 Which hex code is bright green? (a) #ff00ff (b) #0000ff (c) #ff0000 (d) #00ff00
  16. 16.🌈 Which colour of light is strongest in rgb(9, 202, 21)? (a) blue (b) red (c) green
  17. 17.🌈 Which colour of light is strongest in rgb(121, 0, 230)? (a) red (b) green (c) blue
  18. 18.🌈 Which colour is #0000ff? (a) blue (b) white (c) red (d) bright green
  19. 19.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) bright green (c) magenta (d) blue
  20. 20.🌈 In #690000 the red part is the hex number 69. What is it as a normal number?
  21. 21.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #ff00ff (d) #ff0000
  22. 22.🌈 Which colour of light is strongest in rgb(224, 118, 111)? (a) blue (b) red (c) green
  23. 23.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
  24. 24.🌈 Which hex code is black? (a) #ffffff (b) #00ffff (c) #ff00ff (d) #000000
  25. 25.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) blue (c) white (d) bright green
  26. 26.🌈 Which hex code is magenta? (a) #000000 (b) #0000ff (c) #ff00ff (d) #ffffff
  27. 27.🌈 Which colour of light is strongest in rgb(162, 64, 62)? (a) green (b) blue (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(39, 209, 130)? (a) green (b) blue (c) red
  29. 29.🌈 In #2f0000 the red part is the hex number 2f. What is it as a normal number?
  30. 30.🌈 In #9d0000 the red part is the hex number 9d. What is it as a normal number?
  31. 31.🌈 Which colour is #ffff00? (a) magenta (b) cyan (c) yellow (d) black
  32. 32.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) yellow (c) black (d) magenta
  33. 33.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
  34. 34.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  35. 35.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) black (d) red
  36. 36.🌈 Which colour of light is strongest in rgb(49, 49, 165)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour of light is strongest in rgb(11, 252, 1)? (a) red (b) green (c) blue
  38. 38.🌈 Which colour of light is strongest in rgb(224, 81, 113)? (a) green (b) red (c) blue
  39. 39.🌈 Which hex code is blue? (a) #00ffff (b) #ff0000 (c) #0000ff (d) #000000
  40. 40.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #00ff00

Answer key

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

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