← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 105 · 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 #ffffff? (a) blue (b) black (c) white (d) red
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) blue (c) cyan (d) yellow
  4. 4.🌈 Which hex code is red? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #000000
  5. 5.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) red (c) white (d) cyan
  6. 6.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  8. 8.🌈 Which colour is #ff00ff? (a) yellow (b) black (c) magenta (d) blue
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  10. 10.🌈 In #000035 the blue part is the hex number 35. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) yellow (c) bright green (d) blue
  12. 12.🌈 Which colour is #00ffff? (a) black (b) yellow (c) red (d) cyan
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
  14. 14.🌈 Which hex code is white? (a) #ff0000 (b) #000000 (c) #0000ff (d) #ffffff
  15. 15.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
  16. 16.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #ffff00
  17. 17.🌈 Which colour is #000000? (a) blue (b) white (c) yellow (d) black
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) yellow (c) black (d) red
  19. 19.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ffffff (d) #00ffff
  20. 20.🌈 In #001800 the green part is the hex number 18. What is it as a normal number?
  21. 21.🌈 In #008300 the green part is the hex number 83. What is it as a normal number?
  22. 22.🌈 In #e10000 the red part is the hex number e1. What is it as a normal number?
  23. 23.🌈 Which hex code is cyan? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #00ffff
  24. 24.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) bright green (d) black
  25. 25.🌈 Which hex code is magenta? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ffffff
  26. 26.🌈 In #00e700 the green part is the hex number e7. What is it as a normal number?
  27. 27.🌈 In #000020 the blue part is the hex number 20. What is it as a normal number?
  28. 28.🌈 In #000061 the blue part is the hex number 61. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(137, 29, 158)? (a) green (b) red (c) blue
  30. 30.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) red (d) magenta
  31. 31.🌈 Which colour of light is strongest in rgb(128, 73, 197)? (a) blue (b) green (c) red
  32. 32.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) blue (c) magenta (d) yellow
  33. 33.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) cyan (d) blue
  34. 34.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) yellow (d) blue
  35. 35.🌈 Which colour is #ffff00? (a) red (b) magenta (c) yellow (d) cyan
  36. 36.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) black (d) bright green
  37. 37.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  38. 38.🌈 Which colour of light is strongest in rgb(166, 131, 107)? (a) red (b) green (c) blue
  39. 39.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(91, 249, 23)? (a) blue (b) red (c) green

Answer key

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

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