← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 13 · 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 #006900 the green part is the hex number 69. What is it as a normal number?
  2. 2.🌈 In #004500 the green part is the hex number 45. What is it as a normal number?
  3. 3.🌈 Which colour is #ffffff? (a) magenta (b) white (c) cyan (d) bright green
  4. 4.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) magenta (c) red (d) bright green
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  6. 6.🌈 In #0000cb the blue part is the hex number cb. What is it as a normal number?
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  8. 8.🌈 Which colour of light is strongest in rgb(75, 231, 109)? (a) green (b) blue (c) red
  9. 9.🌈 Which colour is #ffff00? (a) black (b) red (c) magenta (d) yellow
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  11. 11.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
  12. 12.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
  13. 13.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) white (d) red
  14. 14.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #00ff00
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  16. 16.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #000000
  17. 17.🌈 Which colour of light is strongest in rgb(243, 87, 6)? (a) red (b) blue (c) green
  18. 18.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  19. 19.🌈 Which colour of light is strongest in rgb(95, 134, 185)? (a) red (b) blue (c) green
  20. 20.🌈 Which hex code is magenta? (a) #00ffff (b) #ff0000 (c) #000000 (d) #ff00ff
  21. 21.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) black (d) red
  22. 22.🌈 Which colour is #ff00ff? (a) bright green (b) cyan (c) red (d) magenta
  23. 23.🌈 Which colour is #ff0000? (a) white (b) red (c) blue (d) yellow
  24. 24.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #00ff00 (d) #ffffff
  25. 25.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
  26. 26.🌈 In #00ca00 the green part is the hex number ca. What is it as a normal number?
  27. 27.🌈 Which hex code is blue? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ffffff
  28. 28.🌈 Which colour is #00ff00? (a) white (b) black (c) bright green (d) red
  29. 29.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) white (d) bright green
  30. 30.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) black (d) yellow
  31. 31.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
  32. 32.🌈 In #1f0000 the red part is the hex number 1f. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(105, 80, 204)? (a) red (b) green (c) blue
  34. 34.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
  35. 35.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
  36. 36.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) blue (c) bright green (d) red
  37. 37.🌈 In #00005a the blue part is the hex number 5a. What is it as a normal number?
  38. 38.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) red (d) yellow
  39. 39.🌈 Which colour of light is strongest in rgb(138, 153, 132)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(218, 136, 103)? (a) blue (b) red (c) green

Answer key

  1. 105
  2. 69
  3. white
  4. red
  5. red
  6. 203
  7. 3
  8. green
  9. yellow
  10. F
  11. 227
  12. 82
  13. yellow
  14. #000000
  15. 255
  16. #00ff00
  17. red
  18. blue
  19. blue
  20. #ff00ff
  21. magenta
  22. magenta
  23. red
  24. #ffffff
  25. 205
  26. 202
  27. #0000ff
  28. bright green
  29. blue
  30. cyan
  31. 55
  32. 31
  33. blue
  34. 197
  35. 156
  36. bright green
  37. 90
  38. white
  39. green
  40. red

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