← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 183 · 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 of light is strongest in rgb(77, 133, 153)? (a) green (b) blue (c) red
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  3. 3.🌈 Which colour is #0000ff? (a) white (b) red (c) bright green (d) blue
  4. 4.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
  5. 5.🌈 Which colour of light is strongest in rgb(5, 168, 57)? (a) green (b) blue (c) red
  6. 6.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) cyan (c) black (d) bright green
  7. 7.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #00ffff
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  9. 9.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) magenta (c) yellow (d) blue
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  11. 11.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  12. 12.🌈 In #900000 the red part is the hex number 90. What is it as a normal number?
  13. 13.🌈 In #003200 the green part is the hex number 32. What is it as a normal number?
  14. 14.🌈 Which colour of light is strongest in rgb(178, 26, 82)? (a) green (b) red (c) blue
  15. 15.🌈 Which hex code is black? (a) #00ff00 (b) #ff00ff (c) #000000 (d) #ffff00
  16. 16.🌈 Which colour of light is strongest in rgb(211, 29, 75)? (a) blue (b) red (c) green
  17. 17.🌈 Which hex code is yellow? (a) #ffff00 (b) #ffffff (c) #000000 (d) #ff0000
  18. 18.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #00ffff (d) #ffff00
  19. 19.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  20. 20.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  21. 21.🌈 Which hex code is bright green? (a) #0000ff (b) #00ffff (c) #ff00ff (d) #00ff00
  22. 22.🌈 Which colour is #ffff00? (a) cyan (b) yellow (c) magenta (d) black
  23. 23.🌈 Which colour of light is strongest in rgb(95, 14, 207)? (a) red (b) blue (c) green
  24. 24.🌈 Which colour of light is strongest in rgb(94, 44, 238)? (a) red (b) green (c) blue
  25. 25.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) white (d) black
  26. 26.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) white (d) black
  27. 27.🌈 In #001b00 the green part is the hex number 1b. What is it as a normal number?
  28. 28.🌈 Which colour is #000000? (a) yellow (b) white (c) black (d) bright green
  29. 29.🌈 Which colour is #00ffff? (a) cyan (b) red (c) black (d) yellow
  30. 30.🌈 Which colour is #ffffff? (a) white (b) magenta (c) black (d) blue
  31. 31.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) red (c) black (d) blue
  32. 32.🌈 Which colour of light is strongest in rgb(150, 68, 134)? (a) blue (b) green (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(135, 224, 12)? (a) red (b) blue (c) green
  34. 34.🌈 Which colour of light is strongest in rgb(52, 159, 22)? (a) red (b) blue (c) green
  35. 35.🌈 Which hex code is white? (a) #ff00ff (b) #000000 (c) #0000ff (d) #ffffff
  36. 36.🌈 Which colour of light is strongest in rgb(139, 236, 38)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(219, 74, 131)? (a) green (b) blue (c) red
  38. 38.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
  39. 39.🌈 Which colour is #ff0000? (a) bright green (b) red (c) white (d) blue
  40. 40.🌈 In #0000b2 the blue part is the hex number b2. What is it as a normal number?

Answer key

  1. blue
  2. 255
  3. blue
  4. 161
  5. green
  6. bright green
  7. #00ffff
  8. red
  9. cyan
  10. F
  11. 242
  12. 144
  13. 50
  14. red
  15. #000000
  16. red
  17. #ffff00
  18. #ff00ff
  19. blue
  20. 3
  21. #00ff00
  22. yellow
  23. blue
  24. blue
  25. magenta
  26. black
  27. 27
  28. black
  29. cyan
  30. white
  31. blue
  32. red
  33. green
  34. green
  35. #ffffff
  36. green
  37. red
  38. 28
  39. red
  40. 178

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