← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 328 · 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 colour is #00ffff? (a) red (b) cyan (c) black (d) yellow
  2. 2.🌈 Which colour of light is strongest in rgb(150, 18, 62)? (a) blue (b) red (c) green
  3. 3.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #00ffff
  4. 4.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
  5. 5.🌈 Which colour of light is strongest in rgb(69, 214, 0)? (a) green (b) red (c) blue
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  7. 7.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) blue (c) bright green (d) black
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  9. 9.🌈 Which colour is #ffffff? (a) white (b) yellow (c) red (d) magenta
  10. 10.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) magenta (c) cyan (d) yellow
  11. 11.🌈 Which colour of light is strongest in rgb(62, 233, 102)? (a) blue (b) green (c) red
  12. 12.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff00ff
  13. 13.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #ffffff (d) #ffff00
  14. 14.🌈 In #003900 the green part is the hex number 39. What is it as a normal number?
  15. 15.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
  16. 16.🌈 Which colour is #ffff00? (a) bright green (b) black (c) yellow (d) white
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) cyan (d) magenta
  18. 18.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  20. 20.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff0000
  21. 21.🌈 Which colour of light is strongest in rgb(173, 38, 67)? (a) blue (b) green (c) red
  22. 22.🌈 Which colour is #000000? (a) white (b) magenta (c) cyan (d) black
  23. 23.🌈 Which colour of light is strongest in rgb(0, 167, 82)? (a) red (b) green (c) blue
  24. 24.🌈 In #040000 the red part is the hex number 04. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) blue (d) black
  26. 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  27. 27.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
  28. 28.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  29. 29.🌈 Which colour of light is strongest in rgb(14, 180, 123)? (a) green (b) blue (c) red
  30. 30.🌈 Which colour is #ff0000? (a) white (b) cyan (c) black (d) red
  31. 31.🌈 In #003a00 the green part is the hex number 3a. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) blue (c) yellow (d) red
  33. 33.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
  34. 34.🌈 In #003500 the green part is the hex number 35. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(121, 223, 125)? (a) red (b) blue (c) green
  36. 36.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #000000
  37. 37.🌈 Which colour of light is strongest in rgb(209, 80, 93)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour of light is strongest in rgb(85, 189, 22)? (a) green (b) red (c) blue
  39. 39.🌈 Which colour of light is strongest in rgb(114, 28, 204)? (a) green (b) red (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(33, 225, 34)? (a) red (b) blue (c) green

Answer key

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

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