← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 318 · 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 hex code is magenta? (a) #000000 (b) #0000ff (c) #ff00ff (d) #00ffff
  2. 2.🌈 Which colour is #ffffff? (a) white (b) bright green (c) black (d) red
  3. 3.🌈 Which colour of light is strongest in rgb(246, 11, 88)? (a) green (b) blue (c) red
  4. 4.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) white (d) blue
  5. 5.🌈 Which colour is #ff0000? (a) red (b) blue (c) bright green (d) magenta
  6. 6.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) red (d) cyan
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  8. 8.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?
  9. 9.🌈 Which hex code is cyan? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #00ffff
  10. 10.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  12. 12.🌈 In #000042 the blue part is the hex number 42. What is it as a normal number?
  13. 13.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) white (d) yellow
  14. 14.🌈 Which colour of light is strongest in rgb(220, 1, 38)? (a) blue (b) green (c) red
  15. 15.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ff00ff
  16. 16.🌈 Which colour of light is strongest in rgb(133, 243, 34)? (a) blue (b) red (c) green
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) white (d) bright green
  18. 18.🌈 Which colour is #000000? (a) black (b) white (c) bright green (d) yellow
  19. 19.🌈 Which colour of light is strongest in rgb(139, 41, 178)? (a) green (b) blue (c) red
  20. 20.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
  22. 22.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) black (d) magenta
  23. 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  24. 24.🌈 In #920000 the red part is the hex number 92. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) yellow (c) white (d) cyan
  26. 26.🌈 In #00a800 the green part is the hex number a8. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(155, 31, 52)? (a) green (b) blue (c) red
  28. 28.🌈 Which hex code is red? (a) #0000ff (b) #000000 (c) #ffffff (d) #ff0000
  29. 29.🌈 In #001e00 the green part is the hex number 1e. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) bright green (c) cyan (d) black
  31. 31.🌈 In #007500 the green part is the hex number 75. What is it as a normal number?
  32. 32.🌈 Which colour is #00ff00? (a) blue (b) cyan (c) magenta (d) bright green
  33. 33.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) black (d) red
  34. 34.🌈 In #df0000 the red part is the hex number df. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(157, 8, 70)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(150, 39, 75)? (a) red (b) blue (c) green
  37. 37.🌈 In #030000 the red part is the hex number 03. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(75, 246, 116)? (a) blue (b) green (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(89, 135, 226)? (a) blue (b) green (c) red
  40. 40.🌈 Which colour of light is strongest in rgb(185, 120, 106)? (a) green (b) blue (c) red

Answer key

  1. #ff00ff
  2. white
  3. red
  4. bright green
  5. red
  6. black
  7. red
  8. 5
  9. #00ffff
  10. 161
  11. blue
  12. 66
  13. cyan
  14. red
  15. #000000
  16. green
  17. red
  18. black
  19. blue
  20. 179
  21. 3
  22. blue
  23. F
  24. 146
  25. white
  26. 168
  27. red
  28. #ff0000
  29. 30
  30. cyan
  31. 117
  32. bright green
  33. yellow
  34. 223
  35. red
  36. red
  37. 3
  38. green
  39. blue
  40. red

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