← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 337 · 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.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  2. 2.🌈 Which colour is #00ffff? (a) red (b) bright green (c) blue (d) cyan
  3. 3.🌈 Which colour is #00ff00? (a) cyan (b) red (c) bright green (d) yellow
  4. 4.🌈 Which colour is #ffffff? (a) red (b) magenta (c) yellow (d) white
  5. 5.🌈 Which colour of light is strongest in rgb(150, 71, 46)? (a) red (b) green (c) blue
  6. 6.🌈 Which colour is #ff0000? (a) cyan (b) red (c) white (d) bright green
  7. 7.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) red (c) white (d) magenta
  8. 8.🌈 Which colour is #000000? (a) black (b) red (c) magenta (d) white
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  12. 12.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) black (d) bright green
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  14. 14.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) yellow (c) white (d) red
  15. 15.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) bright green (c) red (d) blue
  16. 16.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
  17. 17.🌈 Which colour is #ffff00? (a) bright green (b) yellow (c) cyan (d) red
  18. 18.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
  19. 19.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
  20. 20.🌈 Which colour of light is strongest in rgb(114, 165, 133)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is #ff00ff? (a) black (b) blue (c) magenta (d) cyan
  22. 22.🌈 Which hex code is yellow? (a) #ffffff (b) #000000 (c) #ffff00 (d) #00ffff
  23. 23.🌈 Which hex code is red? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #0000ff
  24. 24.🌈 Which colour of light is strongest in rgb(233, 20, 74)? (a) green (b) red (c) blue
  25. 25.🌈 Which colour of light is strongest in rgb(165, 83, 41)? (a) blue (b) red (c) green
  26. 26.🌈 Which colour of light is strongest in rgb(217, 26, 137)? (a) green (b) blue (c) red
  27. 27.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) black (c) yellow (d) red
  28. 28.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
  29. 29.🌈 In #cc0000 the red part is the hex number cc. What is it as a normal number?
  30. 30.🌈 Which colour is #0000ff? (a) bright green (b) red (c) black (d) blue
  31. 31.🌈 Which colour of light is strongest in rgb(212, 84, 136)? (a) red (b) green (c) blue
  32. 32.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #000000 (d) #ff00ff
  33. 33.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #00ffff
  34. 34.🌈 In #0000d0 the blue part is the hex number d0. What is it as a normal number?
  35. 35.🌈 In #2d0000 the red part is the hex number 2d. What is it as a normal number?
  36. 36.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
  37. 37.🌈 In #0000d9 the blue part is the hex number d9. What is it as a normal number?
  38. 38.🌈 Which hex code is blue? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #00ff00
  39. 39.🌈 In #00001d the blue part is the hex number 1d. What is it as a normal number?
  40. 40.🌈 In #0000b2 the blue part is the hex number b2. What is it as a normal number?

Answer key

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

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