← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 74 · 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, 255, 255)? (a) cyan (b) magenta (c) yellow (d) white
  2. 2.🌈 Which hex code is yellow? (a) #00ffff (b) #00ff00 (c) #ffff00 (d) #ff0000
  3. 3.🌈 Which colour of light is strongest in rgb(104, 62, 242)? (a) green (b) red (c) blue
  4. 4.🌈 Which colour of light is strongest in rgb(60, 186, 90)? (a) red (b) green (c) blue
  5. 5.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
  7. 7.🌈 In #a80000 the red part is the hex number a8. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) cyan (d) black
  9. 9.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) magenta (d) bright green
  10. 10.🌈 Which colour of light is strongest in rgb(108, 237, 110)? (a) green (b) blue (c) red
  11. 11.🌈 Which colour is #0000ff? (a) red (b) blue (c) yellow (d) cyan
  12. 12.🌈 Which colour of light is strongest in rgb(181, 28, 45)? (a) green (b) red (c) blue
  13. 13.🌈 In #001600 the green part is the hex number 16. What is it as a normal number?
  14. 14.🌈 Which colour is #ffff00? (a) black (b) magenta (c) yellow (d) white
  15. 15.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  16. 16.🌈 Which colour of light is strongest in rgb(187, 108, 14)? (a) blue (b) red (c) green
  17. 17.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) cyan (d) bright green
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  19. 19.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
  20. 20.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #00ffff (d) #ffff00
  21. 21.🌈 Which colour is #ff0000? (a) red (b) black (c) white (d) blue
  22. 22.🌈 Which colour is #00ffff? (a) blue (b) black (c) red (d) cyan
  23. 23.🌈 Which colour is #00ff00? (a) black (b) red (c) blue (d) bright green
  24. 24.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(233, 55, 23)? (a) red (b) blue (c) green
  26. 26.🌈 In #640000 the red part is the hex number 64. What is it as a normal number?
  27. 27.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #0000ff
  28. 28.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  29. 29.🌈 In #0000ab the blue part is the hex number ab. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(25, 104, 189)? (a) green (b) red (c) blue
  31. 31.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #ffff00
  32. 32.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) red (d) cyan
  33. 33.🌈 Which colour of light is strongest in rgb(2, 217, 134)? (a) red (b) blue (c) green
  34. 34.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) bright green (d) red
  36. 36.🌈 Which colour of light is strongest in rgb(176, 25, 138)? (a) green (b) red (c) blue
  37. 37.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) yellow (d) black
  38. 38.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?
  39. 39.🌈 In #00c400 the green part is the hex number c4. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) bright green (d) black

Answer key

  1. white
  2. #ffff00
  3. blue
  4. green
  5. 133
  6. 3
  7. 168
  8. blue
  9. magenta
  10. green
  11. blue
  12. red
  13. 22
  14. yellow
  15. blue
  16. red
  17. bright green
  18. 255
  19. 190
  20. #ff0000
  21. red
  22. cyan
  23. bright green
  24. 1
  25. red
  26. 100
  27. #0000ff
  28. red
  29. 171
  30. blue
  31. #000000
  32. yellow
  33. green
  34. 116
  35. red
  36. red
  37. cyan
  38. 98
  39. 196
  40. black

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