← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 223 · 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 #001e00 the green part is the hex number 1e. What is it as a normal number?
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  3. 3.🌈 Which colour is #000000? (a) cyan (b) black (c) blue (d) magenta
  4. 4.🌈 Which colour of light is strongest in rgb(67, 137, 153)? (a) blue (b) red (c) green
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  7. 7.🌈 In #001500 the green part is the hex number 15. What is it as a normal number?
  8. 8.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?
  9. 9.🌈 Which colour is #ffff00? (a) yellow (b) red (c) bright green (d) black
  10. 10.🌈 Which colour of light is strongest in rgb(115, 57, 236)? (a) red (b) green (c) blue
  11. 11.🌈 In #b10000 the red part is the hex number b1. What is it as a normal number?
  12. 12.🌈 Which colour is #0000ff? (a) cyan (b) red (c) white (d) blue
  13. 13.🌈 Which colour is #ffffff? (a) yellow (b) cyan (c) white (d) bright green
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) red (c) magenta (d) bright green
  15. 15.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) cyan (c) blue (d) red
  17. 17.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) yellow (c) cyan (d) magenta
  18. 18.🌈 Which colour of light is strongest in rgb(108, 96, 245)? (a) blue (b) green (c) red
  19. 19.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #00ffff (d) #0000ff
  20. 20.🌈 Which colour of light is strongest in rgb(135, 173, 32)? (a) green (b) red (c) blue
  21. 21.🌈 Which colour of light is strongest in rgb(241, 116, 130)? (a) green (b) red (c) blue
  22. 22.🌈 Which hex code is red? (a) #ffffff (b) #000000 (c) #00ffff (d) #ff0000
  23. 23.🌈 Which colour of light is strongest in rgb(19, 51, 167)? (a) green (b) blue (c) red
  24. 24.🌈 In #00b000 the green part is the hex number b0. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) cyan (d) blue
  26. 26.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
  27. 27.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #0000ff (d) #ff0000
  28. 28.🌈 Which colour of light is strongest in rgb(66, 136, 221)? (a) red (b) blue (c) green
  29. 29.🌈 In #ee0000 the red part is the hex number ee. What is it as a normal number?
  30. 30.🌈 In #007900 the green part is the hex number 79. What is it as a normal number?
  31. 31.🌈 In #110000 the red part is the hex number 11. What is it as a normal number?
  32. 32.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffff00 (c) #000000 (d) #00ffff
  33. 33.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
  34. 34.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
  35. 35.🌈 In #0000f5 the blue part is the hex number f5. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(66, 2, 159)? (a) green (b) red (c) blue
  37. 37.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  38. 38.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) white (d) cyan
  39. 39.🌈 Which colour of light is strongest in rgb(154, 121, 59)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) yellow (c) white (d) black

Answer key

  1. 30
  2. blue
  3. black
  4. blue
  5. 255
  6. 3
  7. 21
  8. 205
  9. yellow
  10. blue
  11. 177
  12. blue
  13. white
  14. blue
  15. 11
  16. red
  17. magenta
  18. blue
  19. #00ffff
  20. green
  21. red
  22. #ff0000
  23. blue
  24. 176
  25. black
  26. 9
  27. #000000
  28. blue
  29. 238
  30. 121
  31. 17
  32. #00ff00
  33. 16
  34. 96
  35. 245
  36. blue
  37. red
  38. yellow
  39. red
  40. white

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