← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 79 · 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) 255 (b) 1000 (c) 100 (d) 99
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) bright green (d) magenta
  3. 3.🌈 Which hex code is yellow? (a) #ffffff (b) #000000 (c) #ff00ff (d) #ffff00
  4. 4.🌈 Which colour of light is strongest in rgb(26, 95, 247)? (a) blue (b) red (c) green
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  7. 7.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) bright green (c) black (d) magenta
  9. 9.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) black (c) blue (d) red
  10. 10.🌈 Which colour of light is strongest in rgb(130, 93, 194)? (a) red (b) blue (c) green
  11. 11.🌈 Which colour of light is strongest in rgb(254, 59, 116)? (a) green (b) blue (c) red
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  14. 14.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) blue (d) yellow
  15. 15.🌈 In #008c00 the green part is the hex number 8c. What is it as a normal number?
  16. 16.🌈 Which colour is #ffff00? (a) red (b) black (c) yellow (d) white
  17. 17.🌈 In #2c0000 the red part is the hex number 2c. What is it as a normal number?
  18. 18.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) magenta (c) red (d) bright green
  19. 19.🌈 Which hex code is black? (a) #00ffff (b) #ff0000 (c) #000000 (d) #ff00ff
  20. 20.🌈 Which colour is #00ffff? (a) cyan (b) red (c) bright green (d) black
  21. 21.🌈 In #790000 the red part is the hex number 79. What is it as a normal number?
  22. 22.🌈 Which colour is #ff0000? (a) magenta (b) red (c) cyan (d) white
  23. 23.🌈 Which colour of light is strongest in rgb(14, 54, 241)? (a) red (b) green (c) blue
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) black (d) red
  25. 25.🌈 Which colour of light is strongest in rgb(88, 139, 238)? (a) green (b) blue (c) red
  26. 26.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffffff (d) #000000
  27. 27.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
  28. 28.🌈 Which colour is #000000? (a) yellow (b) magenta (c) black (d) red
  29. 29.🌈 Which hex code is blue? (a) #00ff00 (b) #000000 (c) #ffffff (d) #0000ff
  30. 30.🌈 In #6c0000 the red part is the hex number 6c. What is it as a normal number?
  31. 31.🌈 In #00c100 the green part is the hex number c1. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(191, 67, 2)? (a) red (b) blue (c) green
  33. 33.🌈 In #00d900 the green part is the hex number d9. What is it as a normal number?
  34. 34.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) cyan (d) red
  35. 35.🌈 Which colour is #ff00ff? (a) red (b) cyan (c) magenta (d) blue
  36. 36.🌈 In #009500 the green part is the hex number 95. What is it as a normal number?
  37. 37.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(242, 81, 19)? (a) green (b) blue (c) red
  39. 39.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?
  40. 40.🌈 In #00006c the blue part is the hex number 6c. What is it as a normal number?

Answer key

  1. 255
  2. bright green
  3. #ffff00
  4. blue
  5. blue
  6. F
  7. 62
  8. black
  9. blue
  10. blue
  11. red
  12. red
  13. 3
  14. cyan
  15. 140
  16. yellow
  17. 44
  18. magenta
  19. #000000
  20. cyan
  21. 121
  22. red
  23. blue
  24. white
  25. blue
  26. #ff00ff
  27. 243
  28. black
  29. #0000ff
  30. 108
  31. 193
  32. red
  33. 217
  34. blue
  35. magenta
  36. 149
  37. 18
  38. red
  39. 219
  40. 108

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