← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 208 · 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, 0, 0)? (a) bright green (b) red (c) cyan (d) magenta
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  3. 3.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #0000ff
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  5. 5.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #000000
  6. 6.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) red (d) white
  7. 7.🌈 Which colour of light is strongest in rgb(77, 4, 191)? (a) blue (b) green (c) red
  8. 8.🌈 Which colour is #ffffff? (a) white (b) blue (c) red (d) magenta
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  10. 10.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
  11. 11.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(188, 129, 42)? (a) red (b) blue (c) green
  13. 13.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #000000
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  15. 15.🌈 Which colour of light is strongest in rgb(216, 140, 59)? (a) red (b) blue (c) green
  16. 16.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) white (d) bright green
  17. 17.🌈 Which colour of light is strongest in rgb(168, 90, 15)? (a) green (b) blue (c) red
  18. 18.🌈 Which colour of light is strongest in rgb(195, 128, 19)? (a) green (b) blue (c) red
  19. 19.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
  20. 20.🌈 In #270000 the red part is the hex number 27. What is it as a normal number?
  21. 21.🌈 In #000002 the blue part is the hex number 02. What is it as a normal number?
  22. 22.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) black (c) magenta (d) yellow
  23. 23.🌈 Which colour of light is strongest in rgb(172, 66, 38)? (a) green (b) red (c) blue
  24. 24.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) black (d) yellow
  25. 25.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) black (c) white (d) cyan
  26. 26.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) yellow (c) blue (d) black
  27. 27.🌈 Which colour of light is strongest in rgb(100, 204, 7)? (a) green (b) blue (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(156, 20, 88)? (a) green (b) blue (c) red
  29. 29.🌈 Which colour of light is strongest in rgb(85, 111, 208)? (a) green (b) red (c) blue
  30. 30.🌈 Which colour of light is strongest in rgb(97, 78, 206)? (a) red (b) green (c) blue
  31. 31.🌈 Which colour is #000000? (a) bright green (b) black (c) white (d) red
  32. 32.🌈 Which colour is #ff0000? (a) black (b) blue (c) bright green (d) red
  33. 33.🌈 Which colour is #00ffff? (a) white (b) cyan (c) bright green (d) blue
  34. 34.🌈 Which colour of light is strongest in rgb(168, 90, 14)? (a) blue (b) green (c) red
  35. 35.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) bright green (d) black
  36. 36.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #ffff00 (d) #ff0000
  37. 37.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  38. 38.🌈 In #006200 the green part is the hex number 62. What is it as a normal number?
  39. 39.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #000000 (d) #ff0000
  40. 40.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?

Answer key

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

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