← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 129 · 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) #ff0000 (b) #000000 (c) #00ff00 (d) #00ffff
  2. 2.🌈 Which colour of light is strongest in rgb(49, 60, 162)? (a) red (b) green (c) blue
  3. 3.🌈 In #001d00 the green part is the hex number 1d. What is it as a normal number?
  4. 4.🌈 Which colour of light is strongest in rgb(5, 89, 236)? (a) blue (b) red (c) green
  5. 5.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #0000ff
  6. 6.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) white (d) bright green
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  8. 8.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  9. 9.🌈 In #a70000 the red part is the hex number a7. What is it as a normal number?
  10. 10.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
  11. 11.🌈 Which colour is #ff00ff? (a) black (b) yellow (c) blue (d) magenta
  12. 12.🌈 Which colour is #00ff00? (a) bright green (b) black (c) magenta (d) cyan
  13. 13.🌈 Which colour of light is strongest in rgb(21, 205, 102)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) white (d) cyan
  15. 15.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #ff00ff (d) #ff0000
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  17. 17.🌈 Which colour is #ffffff? (a) blue (b) cyan (c) magenta (d) white
  18. 18.🌈 Which colour of light is strongest in rgb(164, 20, 90)? (a) blue (b) red (c) green
  19. 19.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #ff00ff (d) #0000ff
  20. 20.🌈 In #f90000 the red part is the hex number f9. What is it as a normal number?
  21. 21.🌈 Which colour is #ff0000? (a) white (b) black (c) magenta (d) red
  22. 22.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
  23. 23.🌈 Which colour is #000000? (a) magenta (b) black (c) red (d) yellow
  24. 24.🌈 Which colour of light is strongest in rgb(85, 5, 191)? (a) blue (b) red (c) green
  25. 25.🌈 In #000048 the blue part is the hex number 48. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) red (c) bright green (d) black
  27. 27.🌈 Which colour is #00ffff? (a) white (b) bright green (c) yellow (d) cyan
  28. 28.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  29. 29.🌈 Which colour of light is strongest in rgb(131, 80, 206)? (a) blue (b) red (c) green
  30. 30.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) magenta (d) red
  31. 31.🌈 Which colour of light is strongest in rgb(105, 235, 9)? (a) green (b) blue (c) red
  32. 32.🌈 Which colour of light is strongest in rgb(40, 79, 155)? (a) blue (b) green (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(73, 219, 46)? (a) red (b) green (c) blue
  34. 34.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  35. 35.🌈 Which colour of light is strongest in rgb(54, 158, 0)? (a) blue (b) green (c) red
  36. 36.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  37. 37.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
  38. 38.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #00ff00 (d) #ff0000
  39. 39.🌈 In #005d00 the green part is the hex number 5d. What is it as a normal number?
  40. 40.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?

Answer key

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

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