← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 362 · 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 #ffff00? (a) bright green (b) magenta (c) yellow (d) white
  2. 2.🌈 Which colour is #00ffff? (a) black (b) bright green (c) cyan (d) yellow
  3. 3.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) blue (d) cyan
  4. 4.🌈 Which hex code is blue? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #0000ff
  5. 5.🌈 In #000083 the blue part is the hex number 83. What is it as a normal number?
  6. 6.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) blue (d) bright green
  7. 7.🌈 Which colour of light is strongest in rgb(174, 66, 17)? (a) blue (b) green (c) red
  8. 8.🌈 Which colour of light is strongest in rgb(228, 31, 54)? (a) blue (b) green (c) red
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  11. 11.🌈 Which colour is #000000? (a) black (b) blue (c) magenta (d) yellow
  12. 12.🌈 Which colour of light is strongest in rgb(183, 5, 47)? (a) green (b) red (c) blue
  13. 13.🌈 In #001900 the green part is the hex number 19. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) yellow (d) red
  15. 15.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ff00ff (d) #00ff00
  16. 16.🌈 Which colour of light is strongest in rgb(139, 35, 237)? (a) blue (b) green (c) red
  17. 17.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) red (c) blue (d) magenta
  18. 18.🌈 In #de0000 the red part is the hex number de. What is it as a normal number?
  19. 19.🌈 In #000010 the blue part is the hex number 10. What is it as a normal number?
  20. 20.🌈 Which colour is #00ff00? (a) blue (b) red (c) magenta (d) bright green
  21. 21.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) magenta (d) red
  22. 22.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) blue (d) white
  23. 23.🌈 Which colour is #ffffff? (a) red (b) magenta (c) white (d) bright green
  24. 24.🌈 Which colour of light is strongest in rgb(37, 150, 102)? (a) red (b) blue (c) green
  25. 25.🌈 In #fd0000 the red part is the hex number fd. What is it as a normal number?
  26. 26.🌈 In #660000 the red part is the hex number 66. What is it as a normal number?
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
  28. 28.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #00ff00 (d) #ffffff
  29. 29.🌈 Which colour is #0000ff? (a) red (b) blue (c) yellow (d) black
  30. 30.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) blue (c) yellow (d) bright green
  32. 32.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  33. 33.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #ff0000 (d) #ffff00
  34. 34.🌈 Which colour of light is strongest in rgb(124, 181, 118)? (a) red (b) blue (c) green
  35. 35.🌈 Which hex code is bright green? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #ffff00
  36. 36.🌈 Which colour of light is strongest in rgb(175, 0, 127)? (a) green (b) blue (c) red
  37. 37.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  38. 38.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(58, 161, 13)? (a) green (b) red (c) blue
  40. 40.🌈 In #e00000 the red part is the hex number e0. What is it as a normal number?

Answer key

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

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