← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 203 · 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.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  3. 3.🌈 Which colour of light is strongest in rgb(66, 20, 226)? (a) green (b) blue (c) red
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  5. 5.🌈 Which colour is #00ffff? (a) black (b) cyan (c) blue (d) white
  6. 6.🌈 Which colour of light is strongest in rgb(132, 102, 210)? (a) red (b) blue (c) green
  7. 7.🌈 Which colour of light is strongest in rgb(155, 118, 102)? (a) blue (b) green (c) red
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  9. 9.🌈 In #007600 the green part is the hex number 76. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(166, 77, 76)? (a) blue (b) red (c) green
  11. 11.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) magenta
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  13. 13.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
  14. 14.🌈 Which colour of light is strongest in rgb(104, 35, 203)? (a) green (b) blue (c) red
  15. 15.🌈 Which hex code is yellow? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #ff00ff
  16. 16.🌈 Which colour of light is strongest in rgb(84, 213, 14)? (a) blue (b) red (c) green
  17. 17.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #ffffff
  18. 18.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
  19. 19.🌈 Which colour is #0000ff? (a) bright green (b) black (c) blue (d) red
  20. 20.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) white (c) bright green (d) blue
  21. 21.🌈 Which colour is #ff00ff? (a) white (b) cyan (c) magenta (d) blue
  22. 22.🌈 Which colour of light is strongest in rgb(27, 92, 170)? (a) blue (b) red (c) green
  23. 23.🌈 Which colour of light is strongest in rgb(99, 12, 205)? (a) red (b) blue (c) green
  24. 24.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) red (d) yellow
  25. 25.🌈 Which hex code is bright green? (a) #000000 (b) #ffff00 (c) #ff00ff (d) #00ff00
  26. 26.🌈 Which hex code is magenta? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ff00ff
  27. 27.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) magenta (d) yellow
  28. 28.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(7, 119, 221)? (a) blue (b) red (c) green
  30. 30.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
  31. 31.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ff0000
  32. 32.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
  33. 33.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) magenta
  34. 34.🌈 In #0000df the blue part is the hex number df. What is it as a normal number?
  35. 35.🌈 In #460000 the red part is the hex number 46. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(251, 81, 12)? (a) blue (b) green (c) red
  37. 37.🌈 Which hex code is white? (a) #ff00ff (b) #ff0000 (c) #0000ff (d) #ffffff
  38. 38.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) cyan
  39. 39.🌈 Which colour of light is strongest in rgb(243, 130, 41)? (a) green (b) blue (c) red
  40. 40.🌈 Which colour of light is strongest in rgb(167, 21, 100)? (a) blue (b) red (c) green

Answer key

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

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