← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 97 · 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 red? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #ff0000
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  3. 3.🌈 Which colour is #ff0000? (a) white (b) magenta (c) red (d) black
  4. 4.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) magenta (d) yellow
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  6. 6.🌈 Which colour is #000000? (a) red (b) cyan (c) blue (d) black
  7. 7.🌈 In #003200 the green part is the hex number 32. What is it as a normal number?
  8. 8.🌈 Which colour is #0000ff? (a) magenta (b) yellow (c) black (d) blue
  9. 9.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) white (d) yellow
  10. 10.🌈 Which colour of light is strongest in rgb(168, 112, 47)? (a) green (b) blue (c) red
  11. 11.🌈 Which hex code is black? (a) #00ffff (b) #00ff00 (c) #000000 (d) #ffff00
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  13. 13.🌈 In #940000 the red part is the hex number 94. What is it as a normal number?
  14. 14.🌈 Which colour of light is strongest in rgb(76, 103, 215)? (a) red (b) blue (c) green
  15. 15.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) magenta (d) bright green
  16. 16.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) yellow (d) white
  17. 17.🌈 Which colour of light is strongest in rgb(13, 138, 163)? (a) red (b) blue (c) green
  18. 18.🌈 Which colour of light is strongest in rgb(71, 169, 84)? (a) green (b) red (c) blue
  19. 19.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ff00 (c) #00ffff (d) #ffff00
  20. 20.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
  21. 21.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #ff0000
  22. 22.🌈 Which colour is #00ffff? (a) blue (b) yellow (c) cyan (d) bright green
  23. 23.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #000000
  24. 24.🌈 In #00000e the blue part is the hex number 0e. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) cyan (d) magenta
  26. 26.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  27. 27.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #ffffff (d) #00ff00
  28. 28.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) blue (d) bright green
  29. 29.🌈 In #0000fc the blue part is the hex number fc. What is it as a normal number?
  30. 30.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) red (d) bright green
  31. 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  32. 32.🌈 Which colour of light is strongest in rgb(116, 92, 222)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour is #ffffff? (a) white (b) red (c) yellow (d) cyan
  34. 34.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) cyan (d) magenta
  35. 35.🌈 In #0000e4 the blue part is the hex number e4. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(48, 169, 127)? (a) blue (b) red (c) green
  37. 37.🌈 Which hex code is yellow? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #00ffff
  38. 38.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(3, 135, 177)? (a) green (b) blue (c) red
  40. 40.🌈 Which colour of light is strongest in rgb(98, 4, 170)? (a) green (b) red (c) blue

Answer key

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

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