← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 299 · 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 is #ffffff? (a) red (b) magenta (c) cyan (d) white
  2. 2.🌈 In #006d00 the green part is the hex number 6d. What is it as a normal number?
  3. 3.🌈 Which hex code is black? (a) #00ffff (b) #ff0000 (c) #ffffff (d) #000000
  4. 4.🌈 Which colour of light is strongest in rgb(22, 249, 19)? (a) red (b) blue (c) green
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  7. 7.🌈 Which colour of light is strongest in rgb(182, 11, 86)? (a) green (b) red (c) blue
  8. 8.🌈 Which colour is #000000? (a) black (b) red (c) magenta (d) white
  9. 9.🌈 Which colour of light is strongest in rgb(49, 39, 238)? (a) green (b) blue (c) red
  10. 10.🌈 Which colour of light is strongest in rgb(239, 105, 2)? (a) green (b) red (c) blue
  11. 11.🌈 Which colour is #ff00ff? (a) red (b) white (c) magenta (d) bright green
  12. 12.🌈 Which colour of light is strongest in rgb(32, 151, 54)? (a) green (b) blue (c) red
  13. 13.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) yellow (d) blue
  14. 14.🌈 Which colour of light is strongest in rgb(102, 195, 101)? (a) green (b) red (c) blue
  15. 15.🌈 Which colour of light is strongest in rgb(231, 64, 65)? (a) green (b) blue (c) red
  16. 16.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) cyan (d) red
  17. 17.🌈 Which colour of light is strongest in rgb(217, 59, 2)? (a) green (b) blue (c) red
  18. 18.🌈 Which colour of light is strongest in rgb(224, 118, 135)? (a) blue (b) red (c) green
  19. 19.🌈 Which hex code is cyan? (a) #0000ff (b) #ffffff (c) #00ff00 (d) #00ffff
  20. 20.🌈 Which hex code is yellow? (a) #00ff00 (b) #ff00ff (c) #ffffff (d) #ffff00
  21. 21.🌈 Which colour of light is strongest in rgb(137, 111, 211)? (a) green (b) red (c) blue
  22. 22.🌈 In #c60000 the red part is the hex number c6. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(179, 112, 69)? (a) green (b) blue (c) red
  24. 24.🌈 In #5f0000 the red part is the hex number 5f. What is it as a normal number?
  25. 25.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) magenta (c) blue (d) white
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  28. 28.🌈 Which colour of light is strongest in rgb(232, 107, 105)? (a) green (b) blue (c) red
  29. 29.🌈 Which colour of light is strongest in rgb(120, 188, 33)? (a) red (b) green (c) blue
  30. 30.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) magenta (c) white (d) cyan
  31. 31.🌈 Which colour is #00ffff? (a) black (b) yellow (c) cyan (d) blue
  32. 32.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) yellow (c) bright green (d) magenta
  33. 33.🌈 Which colour of light is strongest in rgb(82, 13, 210)? (a) blue (b) green (c) red
  34. 34.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  35. 35.🌈 Which colour is #ffff00? (a) red (b) yellow (c) magenta (d) blue
  36. 36.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  37. 37.🌈 Which colour of light is strongest in rgb(184, 132, 116)? (a) green (b) blue (c) red
  38. 38.🌈 In #de0000 the red part is the hex number de. What is it as a normal number?
  39. 39.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #ff0000
  40. 40.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?

Answer key

  1. white
  2. 109
  3. #000000
  4. green
  5. red
  6. F
  7. red
  8. black
  9. blue
  10. red
  11. magenta
  12. green
  13. magenta
  14. green
  15. red
  16. red
  17. red
  18. red
  19. #00ffff
  20. #ffff00
  21. blue
  22. 198
  23. red
  24. 95
  25. 25
  26. blue
  27. blue
  28. red
  29. green
  30. white
  31. cyan
  32. bright green
  33. blue
  34. 3
  35. yellow
  36. 255
  37. red
  38. 222
  39. #ffffff
  40. 219

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