← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 63 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  2. 2.🌈 Which colour of light is strongest in rgb(53, 9, 192)? (a) green (b) blue (c) red
  3. 3.🌈 Which colour of light is strongest in rgb(154, 47, 55)? (a) red (b) blue (c) green
  4. 4.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) yellow (d) black
  5. 5.🌈 Which colour of light is strongest in rgb(35, 219, 105)? (a) red (b) green (c) blue
  6. 6.🌈 Which colour is #ff00ff? (a) bright green (b) blue (c) red (d) magenta
  7. 7.🌈 Which hex code is bright green? (a) #ffffff (b) #0000ff (c) #ffff00 (d) #00ff00
  8. 8.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) yellow (d) white
  9. 9.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) yellow (d) blue
  11. 11.🌈 Which colour of light is strongest in rgb(27, 58, 185)? (a) green (b) blue (c) red
  12. 12.🌈 Which colour is #000000? (a) black (b) white (c) magenta (d) red
  13. 13.🌈 In #00e500 the green part is the hex number e5. What is it as a normal number?
  14. 14.🌈 Which colour is #ffff00? (a) bright green (b) cyan (c) red (d) yellow
  15. 15.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) magenta (c) cyan (d) yellow
  16. 16.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
  17. 17.🌈 In #0000ba the blue part is the hex number ba. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(150, 133, 124)? (a) blue (b) red (c) green
  19. 19.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #ff00ff (d) #ffff00
  20. 20.🌈 Which colour is #ffffff? (a) white (b) black (c) blue (d) cyan
  21. 21.🌈 Which hex code is red? (a) #00ffff (b) #ff0000 (c) #ffff00 (d) #ffffff
  22. 22.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) yellow (d) blue
  23. 23.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  24. 24.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  25. 25.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  26. 26.🌈 Which colour is #ff0000? (a) blue (b) white (c) red (d) magenta
  27. 27.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
  28. 28.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
  29. 29.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) cyan (d) blue
  30. 30.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #ffffff (d) #00ff00
  31. 31.🌈 Which colour of light is strongest in rgb(113, 19, 170)? (a) green (b) red (c) blue
  32. 32.🌈 Which hex code is yellow? (a) #00ff00 (b) #00ffff (c) #ffffff (d) #ffff00
  33. 33.🌈 Which colour of light is strongest in rgb(96, 28, 223)? (a) green (b) blue (c) red
  34. 34.🌈 Which colour of light is strongest in rgb(93, 166, 37)? (a) blue (b) red (c) green
  35. 35.🌈 In #ee0000 the red part is the hex number ee. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(163, 28, 21)? (a) green (b) red (c) blue
  37. 37.🌈 Which colour of light is strongest in rgb(169, 91, 38)? (a) blue (b) red (c) green
  38. 38.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  39. 39.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
  40. 40.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?

Answer key

  1. 3
  2. blue
  3. red
  4. blue
  5. green
  6. magenta
  7. #00ff00
  8. yellow
  9. 106
  10. white
  11. blue
  12. black
  13. 229
  14. yellow
  15. cyan
  16. 161
  17. 186
  18. red
  19. #0000ff
  20. white
  21. #ff0000
  22. bright green
  23. 255
  24. red
  25. blue
  26. red
  27. 250
  28. 102
  29. bright green
  30. #000000
  31. blue
  32. #ffff00
  33. blue
  34. green
  35. 238
  36. red
  37. red
  38. F
  39. 130
  40. 126

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