← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 304 · 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) #ff0000 (b) #ffff00 (c) #0000ff (d) #00ff00
  2. 2.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) black (d) white
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  4. 4.🌈 Which colour of light is strongest in rgb(41, 112, 156)? (a) red (b) blue (c) green
  5. 5.🌈 Which colour of light is strongest in rgb(7, 210, 0)? (a) green (b) blue (c) red
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  8. 8.🌈 Which hex code is magenta? (a) #000000 (b) #ffff00 (c) #00ffff (d) #ff00ff
  9. 9.🌈 Which colour is #00ffff? (a) cyan (b) black (c) yellow (d) blue
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
  11. 11.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) cyan (d) black
  12. 12.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) black (c) blue (d) white
  13. 13.🌈 Which colour of light is strongest in rgb(112, 129, 154)? (a) red (b) blue (c) green
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) magenta (c) blue (d) black
  15. 15.🌈 Which colour of light is strongest in rgb(206, 47, 60)? (a) blue (b) green (c) red
  16. 16.🌈 Which colour of light is strongest in rgb(23, 23, 179)? (a) blue (b) green (c) red
  17. 17.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
  18. 18.🌈 Which colour is #ff0000? (a) cyan (b) red (c) magenta (d) blue
  19. 19.🌈 Which hex code is blue? (a) #ff0000 (b) #0000ff (c) #000000 (d) #ffff00
  20. 20.🌈 Which colour is #ffffff? (a) white (b) blue (c) magenta (d) bright green
  21. 21.🌈 Which colour of light is strongest in rgb(251, 38, 42)? (a) green (b) red (c) blue
  22. 22.🌈 Which colour of light is strongest in rgb(196, 44, 42)? (a) green (b) blue (c) red
  23. 23.🌈 Which colour is #000000? (a) blue (b) black (c) magenta (d) cyan
  24. 24.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  25. 25.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) black (d) red
  26. 26.🌈 Which hex code is cyan? (a) #00ffff (b) #00ff00 (c) #ffff00 (d) #ff00ff
  27. 27.🌈 In #009700 the green part is the hex number 97. What is it as a normal number?
  28. 28.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
  29. 29.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(175, 87, 69)? (a) red (b) blue (c) green
  31. 31.🌈 Which colour of light is strongest in rgb(157, 20, 95)? (a) blue (b) green (c) red
  32. 32.🌈 Which hex code is white? (a) #00ffff (b) #00ff00 (c) #ffffff (d) #ffff00
  33. 33.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) bright green (d) yellow
  34. 34.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) cyan (c) white (d) yellow
  35. 35.🌈 Which colour of light is strongest in rgb(116, 81, 212)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(139, 206, 58)? (a) green (b) blue (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(16, 71, 171)? (a) green (b) red (c) blue
  38. 38.🌈 In #fe0000 the red part is the hex number fe. What is it as a normal number?
  39. 39.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) yellow (c) red (d) blue
  40. 40.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?

Answer key

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

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