← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 75 · 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 hex code is white? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
  2. 2.🌈 Which colour is #ff0000? (a) cyan (b) black (c) red (d) magenta
  3. 3.🌈 Which colour of light is strongest in rgb(133, 248, 120)? (a) blue (b) red (c) green
  4. 4.🌈 In #3b0000 the red part is the hex number 3b. What is it as a normal number?
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  6. 6.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) bright green
  7. 7.🌈 Which hex code is bright green? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ff0000
  8. 8.🌈 Which colour of light is strongest in rgb(59, 45, 184)? (a) red (b) blue (c) green
  9. 9.🌈 In #0000a6 the blue part is the hex number a6. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) yellow (c) cyan (d) red
  11. 11.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ffffff (d) #0000ff
  12. 12.🌈 Which colour is #ffff00? (a) blue (b) cyan (c) yellow (d) magenta
  13. 13.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) white (d) cyan
  14. 14.🌈 Which colour of light is strongest in rgb(34, 6, 150)? (a) red (b) green (c) blue
  15. 15.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #ffffff (d) #ffff00
  16. 16.🌈 Which colour is #00ff00? (a) cyan (b) blue (c) magenta (d) bright green
  17. 17.🌈 In #4a0000 the red part is the hex number 4a. What is it as a normal number?
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  19. 19.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
  20. 20.🌈 Which hex code is cyan? (a) #0000ff (b) #000000 (c) #00ffff (d) #ffff00
  21. 21.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) cyan (c) black (d) yellow
  22. 22.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(134, 129, 250)? (a) green (b) blue (c) red
  24. 24.🌈 Which colour of light is strongest in rgb(101, 106, 207)? (a) blue (b) red (c) green
  25. 25.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  26. 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  27. 27.🌈 Which colour of light is strongest in rgb(114, 178, 34)? (a) red (b) green (c) blue
  28. 28.🌈 In #000059 the blue part is the hex number 59. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(129, 94, 200)? (a) green (b) red (c) blue
  30. 30.🌈 In #001500 the green part is the hex number 15. What is it as a normal number?
  31. 31.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) red (d) bright green
  32. 32.🌈 Which colour of light is strongest in rgb(160, 11, 36)? (a) blue (b) green (c) red
  33. 33.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #000000
  34. 34.🌈 Which colour of light is strongest in rgb(28, 255, 31)? (a) red (b) green (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(53, 134, 218)? (a) red (b) blue (c) green
  36. 36.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) bright green (c) magenta (d) yellow
  37. 37.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(96, 7, 154)? (a) green (b) blue (c) red
  39. 39.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) white (d) yellow
  40. 40.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?

Answer key

  1. #ffffff
  2. red
  3. green
  4. 59
  5. 3
  6. blue
  7. #00ff00
  8. blue
  9. 166
  10. cyan
  11. #ffff00
  12. yellow
  13. bright green
  14. blue
  15. #0000ff
  16. bright green
  17. 74
  18. 255
  19. 77
  20. #00ffff
  21. black
  22. 106
  23. blue
  24. blue
  25. red
  26. F
  27. green
  28. 89
  29. blue
  30. 21
  31. cyan
  32. red
  33. #ff0000
  34. green
  35. blue
  36. yellow
  37. 99
  38. blue
  39. magenta
  40. 40

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