← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 294 · 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 black? (a) #ff00ff (b) #00ffff (c) #ff0000 (d) #000000
  2. 2.🌈 Which hex code is magenta? (a) #00ff00 (b) #0000ff (c) #ffff00 (d) #ff00ff
  3. 3.🌈 Which hex code is blue? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #ffffff
  4. 4.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  6. 6.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #00ff00
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  8. 8.🌈 Which colour is #0000ff? (a) magenta (b) cyan (c) white (d) blue
  9. 9.🌈 In #a70000 the red part is the hex number a7. What is it as a normal number?
  10. 10.🌈 In #a30000 the red part is the hex number a3. What is it as a normal number?
  11. 11.🌈 Which colour of light is strongest in rgb(221, 18, 34)? (a) blue (b) red (c) green
  12. 12.🌈 Which colour of light is strongest in rgb(73, 201, 21)? (a) red (b) green (c) blue
  13. 13.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  14. 14.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) bright green (d) cyan
  15. 15.🌈 Which colour of light is strongest in rgb(94, 219, 74)? (a) green (b) blue (c) red
  16. 16.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) cyan (d) bright green
  17. 17.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) blue (c) red (d) yellow
  18. 18.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) red (d) blue
  19. 19.🌈 Which hex code is cyan? (a) #ffff00 (b) #0000ff (c) #00ffff (d) #000000
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  21. 21.🌈 Which colour of light is strongest in rgb(166, 7, 107)? (a) red (b) blue (c) green
  22. 22.🌈 Which colour is #ff00ff? (a) white (b) yellow (c) bright green (d) magenta
  23. 23.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) cyan (d) white
  24. 24.🌈 Which colour of light is strongest in rgb(151, 133, 106)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour of light is strongest in rgb(75, 180, 26)? (a) blue (b) red (c) green
  26. 26.🌈 Which hex code is white? (a) #ff00ff (b) #0000ff (c) #00ff00 (d) #ffffff
  27. 27.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) blue (c) yellow (d) red
  28. 28.🌈 Which colour of light is strongest in rgb(224, 127, 29)? (a) green (b) blue (c) red
  29. 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  30. 30.🌈 Which hex code is yellow? (a) #ff0000 (b) #ff00ff (c) #ffff00 (d) #000000
  31. 31.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) red (c) yellow (d) cyan
  32. 32.🌈 Which colour of light is strongest in rgb(42, 210, 48)? (a) green (b) red (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(17, 10, 180)? (a) red (b) green (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(250, 112, 15)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour is #00ffff? (a) bright green (b) white (c) cyan (d) blue
  36. 36.🌈 Which colour of light is strongest in rgb(123, 210, 95)? (a) green (b) red (c) blue
  37. 37.🌈 In #000024 the blue part is the hex number 24. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(117, 24, 201)? (a) blue (b) red (c) green
  39. 39.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) black (c) bright green (d) blue
  40. 40.🌈 Which colour is #ff0000? (a) yellow (b) black (c) bright green (d) red

Answer key

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

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