← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 72 · 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 #000000? (a) magenta (b) red (c) black (d) blue
  2. 2.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) yellow (c) blue (d) black
  3. 3.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #ff00ff
  4. 4.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #ff0000
  5. 5.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) magenta (d) yellow
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  10. 10.🌈 In #003400 the green part is the hex number 34. What is it as a normal number?
  11. 11.🌈 Which colour of light is strongest in rgb(46, 222, 17)? (a) green (b) blue (c) red
  12. 12.🌈 Which colour of light is strongest in rgb(54, 186, 69)? (a) blue (b) red (c) green
  13. 13.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #000000
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  15. 15.🌈 In #00bb00 the green part is the hex number bb. What is it as a normal number?
  16. 16.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ff0000
  17. 17.🌈 In #670000 the red part is the hex number 67. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(119, 89, 211)? (a) red (b) green (c) blue
  19. 19.🌈 Which colour is #ffff00? (a) yellow (b) magenta (c) blue (d) white
  20. 20.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ff0000
  21. 21.🌈 Which colour of light is strongest in rgb(123, 204, 117)? (a) green (b) blue (c) red
  22. 22.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
  23. 23.🌈 In #002e00 the green part is the hex number 2e. What is it as a normal number?
  24. 24.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
  25. 25.🌈 In #00001c the blue part is the hex number 1c. What is it as a normal number?
  26. 26.🌈 Which colour is #ff0000? (a) cyan (b) black (c) white (d) red
  27. 27.🌈 In #3c0000 the red part is the hex number 3c. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) magenta (c) black (d) red
  29. 29.🌈 Which colour is #ffffff? (a) white (b) magenta (c) blue (d) yellow
  30. 30.🌈 Which colour of light is strongest in rgb(255, 5, 112)? (a) green (b) blue (c) red
  31. 31.🌈 Which colour of light is strongest in rgb(194, 5, 99)? (a) green (b) red (c) blue
  32. 32.🌈 Which colour is #0000ff? (a) blue (b) black (c) bright green (d) magenta
  33. 33.🌈 In #d70000 the red part is the hex number d7. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(173, 46, 3)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(179, 124, 2)? (a) blue (b) green (c) red
  36. 36.🌈 In #000065 the blue part is the hex number 65. What is it as a normal number?
  37. 37.🌈 In #001400 the green part is the hex number 14. What is it as a normal number?
  38. 38.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(80, 209, 79)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(55, 83, 209)? (a) green (b) red (c) blue

Answer key

  1. black
  2. blue
  3. #ff0000
  4. #ffffff
  5. red
  6. 255
  7. F
  8. blue
  9. red
  10. 52
  11. green
  12. green
  13. #ffff00
  14. 3
  15. 187
  16. #000000
  17. 103
  18. blue
  19. yellow
  20. #00ffff
  21. green
  22. 210
  23. 46
  24. 80
  25. 28
  26. red
  27. 60
  28. black
  29. white
  30. red
  31. red
  32. blue
  33. 215
  34. red
  35. red
  36. 101
  37. 20
  38. 84
  39. green
  40. blue

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