← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 48 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  2. 2.🌈 Which colour is #ffff00? (a) white (b) yellow (c) bright green (d) black
  3. 3.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) cyan (d) red
  4. 4.🌈 Which colour is #ff0000? (a) yellow (b) blue (c) red (d) black
  5. 5.🌈 In #004a00 the green part is the hex number 4a. What is it as a normal number?
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  7. 7.🌈 Which colour of light is strongest in rgb(205, 13, 91)? (a) red (b) blue (c) green
  8. 8.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) red (d) magenta
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  11. 11.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #00ff00
  12. 12.🌈 In #000022 the blue part is the hex number 22. What is it as a normal number?
  13. 13.🌈 Which colour is #00ffff? (a) blue (b) magenta (c) cyan (d) yellow
  14. 14.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #ffffff
  15. 15.🌈 Which colour of light is strongest in rgb(49, 153, 70)? (a) blue (b) red (c) green
  16. 16.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(132, 140, 226)? (a) red (b) blue (c) green
  18. 18.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
  19. 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  20. 20.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) magenta (c) yellow (d) bright green
  21. 21.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #000000 (d) #0000ff
  22. 22.🌈 Which colour is #000000? (a) red (b) yellow (c) blue (d) black
  23. 23.🌈 Which colour of light is strongest in rgb(205, 36, 105)? (a) red (b) blue (c) green
  24. 24.🌈 In #1c0000 the red part is the hex number 1c. What is it as a normal number?
  25. 25.🌈 In #0000e8 the blue part is the hex number e8. What is it as a normal number?
  26. 26.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(118, 247, 4)? (a) blue (b) green (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(6, 219, 137)? (a) green (b) blue (c) red
  29. 29.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ffff (c) #ff00ff (d) #0000ff
  30. 30.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) blue (d) white
  31. 31.🌈 Which colour of light is strongest in rgb(136, 121, 151)? (a) red (b) blue (c) green
  32. 32.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) red (d) blue
  33. 33.🌈 Which colour of light is strongest in rgb(36, 234, 40)? (a) green (b) red (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(44, 107, 163)? (a) green (b) blue (c) red
  35. 35.🌈 In #000029 the blue part is the hex number 29. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(70, 103, 192)? (a) red (b) green (c) blue
  37. 37.🌈 Which colour of light is strongest in rgb(231, 48, 1)? (a) blue (b) red (c) green
  38. 38.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) magenta (d) yellow
  39. 39.🌈 In #00d900 the green part is the hex number d9. What is it as a normal number?
  40. 40.🌈 In #3f0000 the red part is the hex number 3f. What is it as a normal number?

Answer key

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

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