← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 220 · 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 of light is strongest in rgb(24, 73, 236)? (a) green (b) red (c) blue
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  3. 3.🌈 Which colour of light is strongest in rgb(162, 119, 122)? (a) blue (b) green (c) red
  4. 4.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) cyan (d) white
  5. 5.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) cyan (d) magenta
  6. 6.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) bright green (c) black (d) white
  7. 7.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) cyan (d) white
  8. 8.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  9. 9.🌈 Which colour is #0000ff? (a) white (b) cyan (c) blue (d) bright green
  10. 10.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #0000ff
  11. 11.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ff0000
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  13. 13.🌈 Which hex code is cyan? (a) #000000 (b) #00ff00 (c) #00ffff (d) #ff0000
  14. 14.🌈 Which colour is #ffffff? (a) white (b) bright green (c) cyan (d) blue
  15. 15.🌈 Which colour of light is strongest in rgb(241, 25, 0)? (a) green (b) red (c) blue
  16. 16.🌈 Which hex code is red? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #ff0000
  17. 17.🌈 Which colour of light is strongest in rgb(209, 127, 28)? (a) green (b) blue (c) red
  18. 18.🌈 In #004f00 the green part is the hex number 4f. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) blue (d) bright green
  20. 20.🌈 Which colour is #000000? (a) red (b) black (c) yellow (d) cyan
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  22. 22.🌈 Which colour is #ff0000? (a) blue (b) bright green (c) yellow (d) red
  23. 23.🌈 Which colour of light is strongest in rgb(32, 25, 196)? (a) green (b) red (c) blue
  24. 24.🌈 Which colour of light is strongest in rgb(101, 237, 56)? (a) red (b) blue (c) green
  25. 25.🌈 In #000059 the blue part is the hex number 59. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) yellow (c) white (d) blue
  27. 27.🌈 In #0000b7 the blue part is the hex number b7. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(188, 55, 16)? (a) red (b) blue (c) green
  29. 29.🌈 Which colour of light is strongest in rgb(163, 93, 60)? (a) green (b) blue (c) red
  30. 30.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
  31. 31.🌈 In #570000 the red part is the hex number 57. What is it as a normal number?
  32. 32.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
  33. 33.🌈 In #00e600 the green part is the hex number e6. What is it as a normal number?
  34. 34.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) red (c) blue (d) magenta
  35. 35.🌈 In #4c0000 the red part is the hex number 4c. What is it as a normal number?
  36. 36.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) blue (d) red
  37. 37.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
  38. 38.🌈 In #00f800 the green part is the hex number f8. What is it as a normal number?
  39. 39.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #00ff00 (d) #ffff00
  40. 40.🌈 Which colour is #00ff00? (a) black (b) bright green (c) yellow (d) cyan

Answer key

  1. blue
  2. F
  3. red
  4. bright green
  5. yellow
  6. white
  7. yellow
  8. 255
  9. blue
  10. #ff00ff
  11. #00ff00
  12. blue
  13. #00ffff
  14. white
  15. red
  16. #ff0000
  17. red
  18. 79
  19. black
  20. black
  21. 3
  22. red
  23. blue
  24. green
  25. 89
  26. magenta
  27. 183
  28. red
  29. red
  30. 211
  31. 87
  32. 67
  33. 230
  34. blue
  35. 76
  36. magenta
  37. 8
  38. 248
  39. #ffff00
  40. bright green

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