← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 96 · 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 rgb(255, 0, 255)? (a) blue (b) red (c) magenta (d) cyan
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  3. 3.🌈 Which hex code is white? (a) #000000 (b) #00ff00 (c) #ffffff (d) #ff0000
  4. 4.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) black (d) white
  5. 5.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) cyan (d) yellow
  6. 6.🌈 In #000023 the blue part is the hex number 23. What is it as a normal number?
  7. 7.🌈 Which hex code is blue? (a) #ffffff (b) #ff0000 (c) #00ffff (d) #0000ff
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
  9. 9.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) blue (d) red
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) white (d) green
  11. 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  12. 12.🌈 Which colour is #00ffff? (a) white (b) cyan (c) bright green (d) blue
  13. 13.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  14. 14.🌈 Which colour of light is strongest in rgb(80, 128, 172)? (a) green (b) red (c) blue
  15. 15.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #00ffff (d) #0000ff
  16. 16.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) yellow (d) red
  17. 17.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) red (c) blue (d) yellow
  18. 18.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ffff (d) #ffff00
  19. 19.🌈 Which colour is #ffffff? (a) yellow (b) white (c) magenta (d) blue
  20. 20.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) blue (c) cyan (d) white
  21. 21.🌈 Which colour of light is strongest in rgb(72, 139, 210)? (a) red (b) green (c) blue
  22. 22.🌈 Which colour is #000000? (a) white (b) yellow (c) black (d) red
  23. 23.🌈 Which colour of light is strongest in rgb(110, 173, 106)? (a) blue (b) red (c) green
  24. 24.🌈 Which colour of light is strongest in rgb(154, 17, 108)? (a) red (b) green (c) blue
  25. 25.🌈 In #000058 the blue part is the hex number 58. What is it as a normal number?
  26. 26.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
  27. 27.🌈 In #0000af the blue part is the hex number af. What is it as a normal number?
  28. 28.🌈 Which hex code is black? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #00ff00
  29. 29.🌈 Which colour is #00ff00? (a) blue (b) red (c) bright green (d) white
  30. 30.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) bright green (d) cyan
  31. 31.🌈 Which colour is #ffff00? (a) red (b) magenta (c) yellow (d) blue
  32. 32.🌈 Which colour of light is strongest in rgb(130, 79, 171)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(228, 60, 67)? (a) blue (b) red (c) green
  34. 34.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) blue (c) magenta (d) red
  36. 36.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
  37. 37.🌈 Which hex code is yellow? (a) #00ff00 (b) #000000 (c) #ffff00 (d) #ffffff
  38. 38.🌈 In #00af00 the green part is the hex number af. What is it as a normal number?
  39. 39.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
  40. 40.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?

Answer key

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

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