← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 24 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
  2. 2.🌈 In #cf0000 the red part is the hex number cf. What is it as a normal number?
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) blue (d) yellow
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  5. 5.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #000000
  6. 6.🌈 In #000300 the green part is the hex number 03. What is it as a normal number?
  7. 7.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #00ffff (d) #ffffff
  8. 8.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) bright green
  9. 9.🌈 Which colour is #ff00ff? (a) black (b) cyan (c) magenta (d) yellow
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  11. 11.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  13. 13.🌈 Which colour of light is strongest in rgb(137, 131, 187)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour is #00ffff? (a) yellow (b) magenta (c) white (d) cyan
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  16. 16.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ffff (d) #00ff00
  17. 17.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) black (c) bright green (d) magenta
  18. 18.🌈 Which hex code is magenta? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
  19. 19.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) black (d) magenta
  20. 20.🌈 In #00000f the blue part is the hex number 0f. What is it as a normal number?
  21. 21.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) red (d) black
  22. 22.🌈 Which colour of light is strongest in rgb(67, 8, 179)? (a) red (b) blue (c) green
  23. 23.🌈 Which colour of light is strongest in rgb(140, 203, 19)? (a) blue (b) red (c) green
  24. 24.🌈 Which colour of light is strongest in rgb(34, 29, 150)? (a) blue (b) green (c) red
  25. 25.🌈 Which colour of light is strongest in rgb(37, 5, 166)? (a) blue (b) red (c) green
  26. 26.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #0000ff
  27. 27.🌈 In #00cc00 the green part is the hex number cc. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) cyan (d) red
  29. 29.🌈 Which colour is #ff0000? (a) blue (b) red (c) black (d) cyan
  30. 30.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
  31. 31.🌈 Which hex code is cyan? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #00ffff
  32. 32.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) black (d) magenta
  33. 33.🌈 In #6f0000 the red part is the hex number 6f. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(252, 25, 113)? (a) blue (b) red (c) green
  35. 35.🌈 Which hex code is red? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #ffffff
  36. 36.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) white (c) blue (d) bright green
  37. 37.🌈 Which colour of light is strongest in rgb(173, 22, 0)? (a) blue (b) red (c) green
  38. 38.🌈 In #3c0000 the red part is the hex number 3c. What is it as a normal number?
  39. 39.🌈 Which colour is #ffffff? (a) yellow (b) cyan (c) white (d) red
  40. 40.🌈 Which colour of light is strongest in rgb(210, 74, 20)? (a) green (b) red (c) blue

Answer key

  1. 3
  2. 207
  3. red
  4. red
  5. #0000ff
  6. 3
  7. #ffff00
  8. yellow
  9. magenta
  10. 255
  11. 178
  12. blue
  13. blue
  14. cyan
  15. F
  16. #00ff00
  17. magenta
  18. #ff00ff
  19. bright green
  20. 15
  21. cyan
  22. blue
  23. green
  24. blue
  25. blue
  26. #ffffff
  27. 204
  28. yellow
  29. red
  30. 225
  31. #00ffff
  32. white
  33. 111
  34. red
  35. #ff0000
  36. bright green
  37. red
  38. 60
  39. white
  40. red

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