← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 118 · 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.🌈 In #4e0000 the red part is the hex number 4e. What is it as a normal number?
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  3. 3.🌈 Which hex code is magenta? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #ffff00
  4. 4.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) bright green (d) red
  5. 5.🌈 Which colour of light is strongest in rgb(232, 25, 2)? (a) blue (b) red (c) green
  6. 6.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  8. 8.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  10. 10.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) bright green (d) cyan
  11. 11.🌈 In #00ad00 the green part is the hex number ad. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) white (c) black (d) red
  13. 13.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) cyan
  14. 14.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) yellow (d) black
  15. 15.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #ff00ff (d) #00ff00
  16. 16.🌈 Which colour of light is strongest in rgb(7, 153, 100)? (a) red (b) green (c) blue
  17. 17.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) red (c) magenta (d) yellow
  18. 18.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) blue (c) white (d) yellow
  19. 19.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  20. 20.🌈 In #004600 the green part is the hex number 46. What is it as a normal number?
  21. 21.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
  22. 22.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ffff00
  23. 23.🌈 Which colour of light is strongest in rgb(73, 182, 15)? (a) green (b) blue (c) red
  24. 24.🌈 Which colour is #000000? (a) white (b) cyan (c) black (d) magenta
  25. 25.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  26. 26.🌈 Which hex code is blue? (a) #ff0000 (b) #0000ff (c) #ffffff (d) #00ffff
  27. 27.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
  28. 28.🌈 In #00dd00 the green part is the hex number dd. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(125, 70, 241)? (a) blue (b) red (c) green
  30. 30.🌈 In #00000d the blue part is the hex number 0d. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) black (d) magenta
  32. 32.🌈 Which colour of light is strongest in rgb(124, 106, 167)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour is #0000ff? (a) magenta (b) cyan (c) yellow (d) blue
  34. 34.🌈 Which colour of light is strongest in rgb(46, 212, 67)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) blue (d) red
  36. 36.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) bright green (d) blue
  37. 37.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
  38. 38.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
  39. 39.🌈 Which hex code is bright green? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #ffff00
  40. 40.🌈 In #0000da the blue part is the hex number da. What is it as a normal number?

Answer key

  1. 78
  2. 3
  3. #ff00ff
  4. red
  5. red
  6. 213
  7. 255
  8. 19
  9. blue
  10. cyan
  11. 173
  12. black
  13. yellow
  14. cyan
  15. #00ffff
  16. green
  17. magenta
  18. white
  19. F
  20. 70
  21. 77
  22. #ffff00
  23. green
  24. black
  25. red
  26. #0000ff
  27. 26
  28. 221
  29. blue
  30. 13
  31. bright green
  32. blue
  33. blue
  34. green
  35. red
  36. magenta
  37. 162
  38. 231
  39. #00ff00
  40. 218

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