← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 274 · 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 #ff00ff? (a) white (b) yellow (c) red (d) magenta
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  3. 3.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) cyan (d) bright green
  4. 4.🌈 Which colour of light is strongest in rgb(157, 21, 76)? (a) red (b) green (c) blue
  5. 5.🌈 Which colour of light is strongest in rgb(137, 91, 237)? (a) blue (b) red (c) green
  6. 6.🌈 In #006a00 the green part is the hex number 6a. What is it as a normal number?
  7. 7.🌈 In #0000fb the blue part is the hex number fb. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) bright green (d) white
  9. 9.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) yellow (d) blue
  11. 11.🌈 Which colour of light is strongest in rgb(50, 58, 163)? (a) green (b) red (c) blue
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  13. 13.🌈 Which colour is #00ffff? (a) white (b) blue (c) cyan (d) red
  14. 14.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
  15. 15.🌈 Which colour is #000000? (a) cyan (b) blue (c) black (d) bright green
  16. 16.🌈 Which colour is #0000ff? (a) blue (b) black (c) red (d) magenta
  17. 17.🌈 In #00004d the blue part is the hex number 4d. What is it as a normal number?
  18. 18.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) black (c) red (d) white
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  20. 20.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #ff0000 (d) #00ff00
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  22. 22.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
  23. 23.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
  24. 24.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) black (d) blue
  25. 25.🌈 Which colour is #00ff00? (a) yellow (b) red (c) white (d) bright green
  26. 26.🌈 Which hex code is red? (a) #ff00ff (b) #00ff00 (c) #00ffff (d) #ff0000
  27. 27.🌈 In #00ae00 the green part is the hex number ae. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(185, 67, 44)? (a) red (b) blue (c) green
  29. 29.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  30. 30.🌈 In #00008b the blue part is the hex number 8b. What is it as a normal number?
  31. 31.🌈 In #006b00 the green part is the hex number 6b. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) black (d) white
  33. 33.🌈 Which colour of light is strongest in rgb(10, 45, 201)? (a) green (b) blue (c) red
  34. 34.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) black (d) cyan
  35. 35.🌈 Which hex code is yellow? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
  36. 36.🌈 Which hex code is cyan? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #0000ff
  37. 37.🌈 Which colour of light is strongest in rgb(93, 236, 95)? (a) green (b) red (c) blue
  38. 38.🌈 In #000f00 the green part is the hex number 0f. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(21, 77, 236)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour is #ffff00? (a) white (b) bright green (c) yellow (d) red

Answer key

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

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