← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 266 · 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 yellow? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ff0000
  2. 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #00ff00 (d) #ffff00
  3. 3.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) red
  4. 4.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ffff (c) #0000ff (d) #ff00ff
  5. 5.🌈 Which colour of light is strongest in rgb(248, 47, 33)? (a) green (b) blue (c) red
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  7. 7.🌈 Which hex code is white? (a) #0000ff (b) #ff0000 (c) #00ffff (d) #ffffff
  8. 8.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) bright green (d) red
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
  10. 10.🌈 Which colour is #ff0000? (a) bright green (b) red (c) blue (d) cyan
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  12. 12.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) white (c) black (d) cyan
  13. 13.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) yellow (d) black
  15. 15.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  17. 17.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) bright green (d) white
  18. 18.🌈 Which colour of light is strongest in rgb(54, 186, 45)? (a) red (b) green (c) blue
  19. 19.🌈 Which colour is #000000? (a) cyan (b) black (c) blue (d) white
  20. 20.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #000000
  21. 21.🌈 Which colour of light is strongest in rgb(118, 188, 15)? (a) blue (b) red (c) green
  22. 22.🌈 Which colour is #ff00ff? (a) yellow (b) white (c) cyan (d) magenta
  23. 23.🌈 Which colour of light is strongest in rgb(52, 159, 102)? (a) green (b) blue (c) red
  24. 24.🌈 Which colour of light is strongest in rgb(104, 85, 156)? (a) green (b) red (c) blue
  25. 25.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(208, 108, 131)? (a) red (b) green (c) blue
  27. 27.🌈 Which colour of light is strongest in rgb(8, 224, 134)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) black (d) magenta
  29. 29.🌈 Which colour is #ffffff? (a) blue (b) red (c) cyan (d) white
  30. 30.🌈 Which colour is #00ffff? (a) black (b) red (c) cyan (d) blue
  31. 31.🌈 Which colour of light is strongest in rgb(97, 62, 193)? (a) green (b) red (c) blue
  32. 32.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  33. 33.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) blue (c) red (d) cyan
  34. 34.🌈 In #530000 the red part is the hex number 53. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(202, 116, 131)? (a) red (b) blue (c) green
  36. 36.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) black (c) cyan (d) red
  37. 37.🌈 In #960000 the red part is the hex number 96. What is it as a normal number?
  38. 38.🌈 In #008700 the green part is the hex number 87. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(16, 180, 30)? (a) red (b) green (c) blue
  40. 40.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?

Answer key

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

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