← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 17 · 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 black? (a) #0000ff (b) #00ffff (c) #ff00ff (d) #000000
  2. 2.🌈 Which colour is #0000ff? (a) red (b) blue (c) white (d) black
  3. 3.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) white (d) magenta
  4. 4.🌈 Which colour of light is strongest in rgb(88, 20, 177)? (a) blue (b) green (c) red
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
  6. 6.🌈 Which colour of light is strongest in rgb(197, 115, 79)? (a) green (b) blue (c) red
  7. 7.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #ff0000
  8. 8.🌈 Which colour is #000000? (a) yellow (b) magenta (c) black (d) blue
  9. 9.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #0000ff
  10. 10.🌈 Which colour of light is strongest in rgb(96, 23, 151)? (a) blue (b) red (c) green
  11. 11.🌈 Which colour of light is strongest in rgb(111, 163, 131)? (a) blue (b) red (c) green
  12. 12.🌈 Which hex code is white? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #000000
  13. 13.🌈 Which colour of light is strongest in rgb(204, 88, 128)? (a) blue (b) green (c) red
  14. 14.🌈 Which colour of light is strongest in rgb(124, 57, 152)? (a) green (b) blue (c) red
  15. 15.🌈 Which colour is #ffffff? (a) red (b) white (c) magenta (d) yellow
  16. 16.🌈 Which colour of light is strongest in rgb(60, 122, 158)? (a) red (b) blue (c) green
  17. 17.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(13, 33, 235)? (a) blue (b) red (c) green
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) magenta (d) yellow
  20. 20.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  21. 21.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) magenta (c) white (d) yellow
  22. 22.🌈 Which colour of light is strongest in rgb(242, 76, 46)? (a) blue (b) green (c) red
  23. 23.🌈 In #0000d1 the blue part is the hex number d1. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(110, 202, 112)? (a) red (b) green (c) blue
  25. 25.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff0000 (c) #00ff00 (d) #ff00ff
  26. 26.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) magenta (c) yellow (d) blue
  27. 27.🌈 Which colour is #ffff00? (a) cyan (b) red (c) blue (d) yellow
  28. 28.🌈 Which colour of light is strongest in rgb(53, 217, 26)? (a) green (b) blue (c) red
  29. 29.🌈 Which colour is #00ffff? (a) red (b) bright green (c) magenta (d) cyan
  30. 30.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) magenta (d) blue
  32. 32.🌈 Which colour of light is strongest in rgb(94, 163, 21)? (a) red (b) blue (c) green
  33. 33.🌈 In #770000 the red part is the hex number 77. What is it as a normal number?
  34. 34.🌈 In #008e00 the green part is the hex number 8e. What is it as a normal number?
  35. 35.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  36. 36.🌈 Which hex code is bright green? (a) #000000 (b) #ff00ff (c) #00ff00 (d) #0000ff
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) blue (c) black (d) magenta
  38. 38.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) blue (d) red
  39. 39.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
  40. 40.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?

Answer key

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

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