← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 349 · 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 is #ff00ff? (a) blue (b) white (c) magenta (d) red
  2. 2.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
  3. 3.🌈 Which hex code is blue? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #0000ff
  4. 4.🌈 Which colour of light is strongest in rgb(118, 112, 249)? (a) blue (b) green (c) red
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  6. 6.🌈 In #00c700 the green part is the hex number c7. What is it as a normal number?
  7. 7.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #ffff00
  8. 8.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ff00ff
  9. 9.🌈 Which colour of light is strongest in rgb(131, 151, 69)? (a) blue (b) green (c) red
  10. 10.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
  11. 11.🌈 Which hex code is black? (a) #0000ff (b) #ffffff (c) #000000 (d) #ffff00
  12. 12.🌈 Which colour of light is strongest in rgb(16, 154, 116)? (a) blue (b) red (c) green
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  14. 14.🌈 In #0000a7 the blue part is the hex number a7. What is it as a normal number?
  15. 15.🌈 Which colour is #0000ff? (a) black (b) magenta (c) blue (d) cyan
  16. 16.🌈 Which colour of light is strongest in rgb(94, 54, 242)? (a) red (b) green (c) blue
  17. 17.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #0000ff
  18. 18.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
  19. 19.🌈 In #005300 the green part is the hex number 53. What is it as a normal number?
  20. 20.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) white (c) bright green (d) cyan
  21. 21.🌈 Which hex code is cyan? (a) #ff0000 (b) #000000 (c) #00ffff (d) #00ff00
  22. 22.🌈 In #003d00 the green part is the hex number 3d. What is it as a normal number?
  23. 23.🌈 Which colour is #000000? (a) bright green (b) red (c) yellow (d) black
  24. 24.🌈 Which colour of light is strongest in rgb(49, 112, 243)? (a) blue (b) green (c) red
  25. 25.🌈 Which hex code is white? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ffffff
  26. 26.🌈 Which colour of light is strongest in rgb(73, 253, 123)? (a) blue (b) green (c) red
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  28. 28.🌈 Which colour of light is strongest in rgb(224, 50, 134)? (a) blue (b) red (c) green
  29. 29.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
  30. 30.🌈 In #0000e6 the blue part is the hex number e6. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(104, 254, 85)? (a) blue (b) green (c) red
  32. 32.🌈 Which colour of light is strongest in rgb(129, 207, 77)? (a) blue (b) green (c) red
  33. 33.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  34. 34.🌈 In #490000 the red part is the hex number 49. What is it as a normal number?
  35. 35.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
  36. 36.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
  37. 37.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) red (d) bright green
  38. 38.🌈 Which colour is #ff0000? (a) magenta (b) black (c) white (d) red
  39. 39.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
  40. 40.🌈 Which hex code is yellow? (a) #ff0000 (b) #ff00ff (c) #ffff00 (d) #000000

Answer key

  1. magenta
  2. 69
  3. #0000ff
  4. blue
  5. 3
  6. 199
  7. #ff00ff
  8. #ff0000
  9. green
  10. 97
  11. #000000
  12. green
  13. red
  14. 167
  15. blue
  16. blue
  17. #00ff00
  18. 82
  19. 83
  20. cyan
  21. #00ffff
  22. 61
  23. black
  24. blue
  25. #ffffff
  26. green
  27. blue
  28. red
  29. 102
  30. 230
  31. green
  32. green
  33. F
  34. 73
  35. 255
  36. 217
  37. cyan
  38. red
  39. 208
  40. #ffff00

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