← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 204 · 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 of light is strongest in rgb(115, 49, 254)? (a) green (b) red (c) blue
  2. 2.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
  3. 3.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
  4. 4.🌈 Which colour of light is strongest in rgb(53, 154, 59)? (a) blue (b) red (c) green
  5. 5.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff00ff (c) #00ffff (d) #ffffff
  6. 6.🌈 Which colour is #0000ff? (a) blue (b) red (c) bright green (d) magenta
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  8. 8.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #ffffff
  9. 9.🌈 Which colour of light is strongest in rgb(56, 235, 21)? (a) green (b) red (c) blue
  10. 10.🌈 In #0000fe the blue part is the hex number fe. What is it as a normal number?
  11. 11.🌈 Which colour is #ff0000? (a) blue (b) bright green (c) magenta (d) red
  12. 12.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) bright green (d) white
  13. 13.🌈 Which colour of light is strongest in rgb(70, 187, 82)? (a) blue (b) green (c) red
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
  15. 15.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff00ff
  16. 16.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
  17. 17.🌈 In #0000b0 the blue part is the hex number b0. What is it as a normal number?
  18. 18.🌈 Which colour is #ffffff? (a) blue (b) bright green (c) white (d) yellow
  19. 19.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
  20. 20.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(153, 43, 96)? (a) blue (b) green (c) red
  22. 22.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #0000ff
  23. 23.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) red (d) bright green
  24. 24.🌈 Which colour of light is strongest in rgb(24, 180, 75)? (a) blue (b) red (c) green
  25. 25.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) blue (c) red (d) white
  26. 26.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  27. 27.🌈 Which colour of light is strongest in rgb(86, 30, 229)? (a) blue (b) green (c) red
  28. 28.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) cyan (c) blue (d) bright green
  29. 29.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) blue (c) red (d) magenta
  30. 30.🌈 Which colour of light is strongest in rgb(122, 203, 137)? (a) green (b) blue (c) red
  31. 31.🌈 Which colour of light is strongest in rgb(84, 13, 171)? (a) red (b) green (c) blue
  32. 32.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) magenta (c) cyan (d) white
  33. 33.🌈 In #00a000 the green part is the hex number a0. What is it as a normal number?
  34. 34.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) yellow (c) bright green (d) cyan
  35. 35.🌈 Which colour of light is strongest in rgb(24, 163, 85)? (a) red (b) blue (c) green
  36. 36.🌈 In #2d0000 the red part is the hex number 2d. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) black (c) white (d) bright green
  38. 38.🌈 In #00000a the blue part is the hex number 0a. What is it as a normal number?
  39. 39.🌈 In #005600 the green part is the hex number 56. 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. blue
  2. #ff0000
  3. 44
  4. green
  5. #ffff00
  6. blue
  7. F
  8. #00ff00
  9. green
  10. 254
  11. red
  12. blue
  13. green
  14. 3
  15. #ffffff
  16. 197
  17. 176
  18. white
  19. 28
  20. 102
  21. red
  22. #ff00ff
  23. yellow
  24. green
  25. red
  26. red
  27. blue
  28. yellow
  29. magenta
  30. green
  31. blue
  32. cyan
  33. 160
  34. bright green
  35. green
  36. 45
  37. white
  38. 10
  39. 86
  40. 18

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