← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 217 · 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.🌈 In #009900 the green part is the hex number 99. What is it as a normal number?
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  4. 4.🌈 Which colour is #00ffff? (a) red (b) white (c) blue (d) cyan
  5. 5.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) yellow (d) red
  6. 6.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) white (d) blue
  7. 7.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #000000
  8. 8.🌈 Which hex code is red? (a) #00ffff (b) #ff0000 (c) #ff00ff (d) #0000ff
  9. 9.🌈 Which colour is #ff00ff? (a) white (b) black (c) magenta (d) yellow
  10. 10.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) yellow (c) bright green (d) blue
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) white (c) blue (d) red
  12. 12.🌈 Which colour of light is strongest in rgb(80, 175, 87)? (a) green (b) red (c) blue
  13. 13.🌈 Which colour of light is strongest in rgb(82, 225, 72)? (a) green (b) blue (c) red
  14. 14.🌈 In #0000e4 the blue part is the hex number e4. What is it as a normal number?
  15. 15.🌈 In #001500 the green part is the hex number 15. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(162, 63, 86)? (a) red (b) green (c) blue
  17. 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  18. 18.🌈 Which colour of light is strongest in rgb(120, 203, 103)? (a) blue (b) green (c) red
  19. 19.🌈 Which colour of light is strongest in rgb(104, 150, 13)? (a) blue (b) red (c) green
  20. 20.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(251, 10, 35)? (a) green (b) blue (c) red
  22. 22.🌈 Which colour of light is strongest in rgb(56, 209, 103)? (a) blue (b) green (c) red
  23. 23.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  24. 24.🌈 Which colour of light is strongest in rgb(203, 21, 131)? (a) blue (b) green (c) red
  25. 25.🌈 Which hex code is cyan? (a) #ffffff (b) #ff00ff (c) #00ffff (d) #ff0000
  26. 26.🌈 Which colour is #000000? (a) black (b) red (c) white (d) magenta
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  28. 28.🌈 Which colour of light is strongest in rgb(115, 69, 176)? (a) blue (b) green (c) red
  29. 29.🌈 Which colour of light is strongest in rgb(236, 87, 131)? (a) green (b) blue (c) red
  30. 30.🌈 In #003a00 the green part is the hex number 3a. What is it as a normal number?
  31. 31.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #00ffff (d) #ffff00
  32. 32.🌈 In #d80000 the red part is the hex number d8. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(176, 28, 50)? (a) green (b) blue (c) red
  34. 34.🌈 Which colour is #ffff00? (a) black (b) white (c) yellow (d) bright green
  35. 35.🌈 Which colour of light is strongest in rgb(167, 1, 83)? (a) blue (b) green (c) red
  36. 36.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) white (d) red
  38. 38.🌈 In #f50000 the red part is the hex number f5. What is it as a normal number?
  39. 39.🌈 Which hex code is bright green? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #00ff00
  40. 40.🌈 Which colour is #ff0000? (a) cyan (b) white (c) red (d) magenta

Answer key

  1. 153
  2. red
  3. 255
  4. cyan
  5. cyan
  6. white
  7. #ffffff
  8. #ff0000
  9. magenta
  10. bright green
  11. red
  12. green
  13. green
  14. 228
  15. 21
  16. red
  17. F
  18. green
  19. green
  20. 132
  21. red
  22. green
  23. blue
  24. red
  25. #00ffff
  26. black
  27. 3
  28. blue
  29. red
  30. 58
  31. #000000
  32. 216
  33. red
  34. yellow
  35. red
  36. 251
  37. black
  38. 245
  39. #00ff00
  40. red

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