← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 278 · 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 cyan? (a) #00ffff (b) #000000 (c) #0000ff (d) #ff00ff
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  3. 3.🌈 Which hex code is blue? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #ffff00
  4. 4.🌈 Which colour is #ff0000? (a) magenta (b) bright green (c) yellow (d) red
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  6. 6.🌈 Which colour of light is strongest in rgb(233, 37, 107)? (a) green (b) blue (c) red
  7. 7.🌈 Which colour of light is strongest in rgb(238, 117, 98)? (a) green (b) red (c) blue
  8. 8.🌈 Which hex code is yellow? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #00ff00
  9. 9.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  11. 11.🌈 Which hex code is white? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ffffff
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
  13. 13.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #000000 (d) #0000ff
  14. 14.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) yellow (c) red (d) black
  15. 15.🌈 Which hex code is red? (a) #00ffff (b) #ffffff (c) #000000 (d) #ff0000
  16. 16.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) cyan (c) yellow (d) blue
  17. 17.🌈 Which colour is #0000ff? (a) black (b) red (c) blue (d) yellow
  18. 18.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) red (d) magenta
  19. 19.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #00ff00 (d) #ff0000
  20. 20.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) magenta (d) cyan
  21. 21.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) cyan (d) magenta
  22. 22.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) bright green (c) black (d) white
  23. 23.🌈 Which colour of light is strongest in rgb(204, 59, 27)? (a) red (b) blue (c) green
  24. 24.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) bright green (d) red
  26. 26.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) black (d) blue
  27. 27.🌈 Which colour is #ffffff? (a) blue (b) magenta (c) cyan (d) white
  28. 28.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
  29. 29.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) yellow (d) bright green
  30. 30.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
  31. 31.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  32. 32.🌈 Which colour of light is strongest in rgb(221, 95, 0)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(3, 30, 197)? (a) blue (b) green (c) red
  34. 34.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
  35. 35.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
  36. 36.🌈 In #001500 the green part is the hex number 15. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(252, 31, 92)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour of light is strongest in rgb(44, 162, 37)? (a) green (b) red (c) blue
  39. 39.🌈 Which hex code is black? (a) #ffff00 (b) #ffffff (c) #000000 (d) #0000ff
  40. 40.🌈 In #fe0000 the red part is the hex number fe. What is it as a normal number?

Answer key

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

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