← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 226 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) bright green (d) red
  4. 4.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) black (c) bright green (d) blue
  5. 5.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) white (d) red
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  7. 7.🌈 Which colour is #ffffff? (a) yellow (b) red (c) white (d) magenta
  8. 8.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #000000
  9. 9.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(169, 10, 29)? (a) red (b) green (c) blue
  11. 11.🌈 Which colour is #ffff00? (a) yellow (b) black (c) blue (d) bright green
  12. 12.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff00ff (c) #ffffff (d) #ffff00
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  14. 14.🌈 Which colour of light is strongest in rgb(118, 39, 188)? (a) green (b) red (c) blue
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  16. 16.🌈 Which colour is #ff0000? (a) cyan (b) red (c) magenta (d) black
  17. 17.🌈 Which colour is #000000? (a) magenta (b) black (c) yellow (d) blue
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) yellow (d) magenta
  19. 19.🌈 Which hex code is red? (a) #000000 (b) #00ff00 (c) #ff0000 (d) #ffffff
  20. 20.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(30, 210, 94)? (a) blue (b) green (c) red
  22. 22.🌈 In #00000d the blue part is the hex number 0d. What is it as a normal number?
  23. 23.🌈 Which colour is #0000ff? (a) red (b) black (c) blue (d) yellow
  24. 24.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
  25. 25.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
  26. 26.🌈 In #4e0000 the red part is the hex number 4e. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(39, 35, 160)? (a) blue (b) red (c) green
  28. 28.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #00ffff (d) #00ff00
  29. 29.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #00ff00
  30. 30.🌈 In #0000e5 the blue part is the hex number e5. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(20, 117, 169)? (a) blue (b) green (c) red
  32. 32.🌈 Which colour of light is strongest in rgb(6, 216, 24)? (a) green (b) red (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(58, 163, 32)? (a) red (b) blue (c) green
  34. 34.🌈 In #8c0000 the red part is the hex number 8c. What is it as a normal number?
  35. 35.🌈 Which colour is #ff00ff? (a) red (b) blue (c) magenta (d) bright green
  36. 36.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #00ff00 (d) #ffffff
  37. 37.🌈 Which hex code is cyan? (a) #0000ff (b) #ffffff (c) #00ffff (d) #000000
  38. 38.🌈 In #2c0000 the red part is the hex number 2c. What is it as a normal number?
  39. 39.🌈 Which colour is #00ff00? (a) bright green (b) white (c) yellow (d) red
  40. 40.🌈 Which colour of light is strongest in rgb(84, 59, 195)? (a) blue (b) green (c) red

Answer key

  1. 255
  2. 3
  3. blue
  4. bright green
  5. black
  6. blue
  7. white
  8. #ffff00
  9. 77
  10. red
  11. yellow
  12. #ff00ff
  13. red
  14. blue
  15. F
  16. red
  17. black
  18. red
  19. #ff0000
  20. 231
  21. green
  22. 13
  23. blue
  24. 38
  25. 131
  26. 78
  27. blue
  28. #000000
  29. #00ff00
  30. 229
  31. blue
  32. green
  33. green
  34. 140
  35. magenta
  36. #0000ff
  37. #00ffff
  38. 44
  39. bright green
  40. blue

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