← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 302 · 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(0, 255, 0)? (a) white (b) black (c) blue (d) bright green
  2. 2.🌈 Which colour is #ffff00? (a) cyan (b) yellow (c) white (d) blue
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  5. 5.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) bright green (d) cyan
  6. 6.🌈 Which hex code is red? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #000000
  7. 7.🌈 In #950000 the red part is the hex number 95. What is it as a normal number?
  8. 8.🌈 Which colour is #ff0000? (a) bright green (b) blue (c) red (d) white
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  10. 10.🌈 Which colour is #00ff00? (a) black (b) white (c) magenta (d) bright green
  11. 11.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
  12. 12.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #00ffff (d) #ffffff
  13. 13.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) white (c) black (d) red
  14. 14.🌈 Which colour is #000000? (a) cyan (b) blue (c) bright green (d) black
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  16. 16.🌈 Which colour of light is strongest in rgb(200, 29, 7)? (a) red (b) blue (c) green
  17. 17.🌈 In #000081 the blue part is the hex number 81. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(192, 21, 113)? (a) blue (b) green (c) red
  19. 19.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #00ffff
  20. 20.🌈 Which colour of light is strongest in rgb(228, 61, 3)? (a) green (b) blue (c) red
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  22. 22.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(24, 201, 114)? (a) red (b) green (c) blue
  24. 24.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) bright green (d) black
  25. 25.🌈 Which colour of light is strongest in rgb(117, 231, 103)? (a) blue (b) red (c) green
  26. 26.🌈 Which colour is #0000ff? (a) cyan (b) yellow (c) white (d) blue
  27. 27.🌈 Which colour is #ff00ff? (a) red (b) cyan (c) bright green (d) magenta
  28. 28.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) blue (d) red
  29. 29.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(197, 31, 4)? (a) green (b) red (c) blue
  31. 31.🌈 Which colour of light is strongest in rgb(21, 244, 54)? (a) blue (b) green (c) red
  32. 32.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #0000ff (d) #00ffff
  33. 33.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
  34. 34.🌈 In #a70000 the red part is the hex number a7. What is it as a normal number?
  35. 35.🌈 In #000095 the blue part is the hex number 95. What is it as a normal number?
  36. 36.🌈 In #000099 the blue part is the hex number 99. What is it as a normal number?
  37. 37.🌈 In #e90000 the red part is the hex number e9. What is it as a normal number?
  38. 38.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) bright green (d) magenta
  39. 39.🌈 Which colour of light is strongest in rgb(22, 232, 84)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(25, 179, 88)? (a) green (b) red (c) blue

Answer key

  1. bright green
  2. yellow
  3. 255
  4. blue
  5. magenta
  6. #ff0000
  7. 149
  8. red
  9. red
  10. bright green
  11. 26
  12. #00ffff
  13. black
  14. black
  15. F
  16. red
  17. 129
  18. red
  19. #0000ff
  20. red
  21. 3
  22. 50
  23. green
  24. cyan
  25. green
  26. blue
  27. magenta
  28. cyan
  29. 130
  30. red
  31. green
  32. #ffff00
  33. 131
  34. 167
  35. 149
  36. 153
  37. 233
  38. white
  39. green
  40. green

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