← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 7 · 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 #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  2. 2.🌈 In #00a700 the green part is the hex number a7. What is it as a normal number?
  3. 3.🌈 Which colour of light is strongest in rgb(25, 190, 47)? (a) green (b) blue (c) red
  4. 4.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) yellow (d) magenta
  5. 5.🌈 Which colour of light is strongest in rgb(27, 176, 13)? (a) green (b) blue (c) red
  6. 6.🌈 Which colour of light is strongest in rgb(253, 134, 74)? (a) green (b) red (c) blue
  7. 7.🌈 Which colour of light is strongest in rgb(64, 71, 204)? (a) blue (b) green (c) red
  8. 8.🌈 Which colour is #0000ff? (a) red (b) blue (c) black (d) white
  9. 9.🌈 Which colour of light is strongest in rgb(244, 45, 41)? (a) green (b) blue (c) red
  10. 10.🌈 In #1d0000 the red part is the hex number 1d. What is it as a normal number?
  11. 11.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #ffffff
  12. 12.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #ffff00 (d) #0000ff
  13. 13.🌈 In #d60000 the red part is the hex number d6. What is it as a normal number?
  14. 14.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
  15. 15.🌈 Which colour is #000000? (a) white (b) black (c) yellow (d) bright green
  16. 16.🌈 Which colour of light is strongest in rgb(117, 197, 43)? (a) red (b) blue (c) green
  17. 17.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ff00
  18. 18.🌈 Which colour of light is strongest in rgb(84, 251, 73)? (a) blue (b) green (c) red
  19. 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
  20. 20.🌈 Which colour is #ffffff? (a) bright green (b) red (c) white (d) magenta
  21. 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  22. 22.🌈 Which colour of light is strongest in rgb(224, 29, 138)? (a) blue (b) green (c) red
  23. 23.🌈 In #005500 the green part is the hex number 55. What is it as a normal number?
  24. 24.🌈 Which hex code is red? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #ffffff
  25. 25.🌈 Which colour of light is strongest in rgb(241, 61, 86)? (a) blue (b) green (c) red
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) blue (d) yellow
  27. 27.🌈 Which colour is #ff00ff? (a) bright green (b) cyan (c) magenta (d) red
  28. 28.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) red (c) yellow (d) cyan
  29. 29.🌈 Which hex code is magenta? (a) #ffffff (b) #0000ff (c) #00ffff (d) #ff00ff
  30. 30.🌈 Which hex code is black? (a) #0000ff (b) #ff0000 (c) #000000 (d) #00ff00
  31. 31.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  32. 32.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) blue (d) cyan
  33. 33.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
  34. 34.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #000000
  35. 35.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) bright green (d) red
  36. 36.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(53, 77, 150)? (a) red (b) green (c) blue
  38. 38.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
  39. 39.🌈 Which colour is #ffff00? (a) red (b) blue (c) black (d) yellow
  40. 40.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000

Answer key

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

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