← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 82 · 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 rgb(0, 0, 0)? (a) blue (b) black (c) magenta (d) yellow
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) black (d) magenta
  4. 4.🌈 Which hex code is magenta? (a) #00ffff (b) #ff00ff (c) #00ff00 (d) #ff0000
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  6. 6.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
  7. 7.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) cyan (c) red (d) bright green
  8. 8.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) bright green (d) white
  9. 9.🌈 Which colour is #ff0000? (a) magenta (b) bright green (c) red (d) yellow
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
  11. 11.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ffff00
  12. 12.🌈 Which colour is #00ffff? (a) black (b) blue (c) cyan (d) bright green
  13. 13.🌈 Which colour of light is strongest in rgb(233, 107, 17)? (a) blue (b) red (c) green
  14. 14.🌈 In #004c00 the green part is the hex number 4c. What is it as a normal number?
  15. 15.🌈 In #000039 the blue part is the hex number 39. What is it as a normal number?
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  17. 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  18. 18.🌈 In #009600 the green part is the hex number 96. What is it as a normal number?
  19. 19.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?
  20. 20.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #ff0000 (d) #ffff00
  21. 21.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #000000
  22. 22.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  23. 23.🌈 Which hex code is black? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #000000
  24. 24.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) white (c) red (d) cyan
  26. 26.🌈 Which colour of light is strongest in rgb(31, 197, 61)? (a) green (b) red (c) blue
  27. 27.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
  28. 28.🌈 Which colour is #000000? (a) red (b) magenta (c) white (d) black
  29. 29.🌈 Which colour of light is strongest in rgb(2, 178, 86)? (a) red (b) blue (c) green
  30. 30.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) yellow (c) magenta (d) red
  32. 32.🌈 Which colour of light is strongest in rgb(244, 4, 96)? (a) green (b) red (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(159, 67, 102)? (a) green (b) blue (c) red
  34. 34.🌈 Which colour of light is strongest in rgb(76, 40, 244)? (a) red (b) green (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(96, 152, 64)? (a) red (b) blue (c) green
  36. 36.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) blue (d) yellow
  38. 38.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) black (d) bright green
  39. 39.🌈 Which colour is #00ff00? (a) bright green (b) cyan (c) magenta (d) yellow
  40. 40.🌈 Which hex code is white? (a) #ff00ff (b) #ffffff (c) #00ffff (d) #00ff00

Answer key

  1. black
  2. blue
  3. blue
  4. #ff00ff
  5. 255
  6. 133
  7. bright green
  8. magenta
  9. red
  10. red
  11. #00ff00
  12. cyan
  13. red
  14. 76
  15. 57
  16. 3
  17. F
  18. 150
  19. 219
  20. #ffff00
  21. #00ffff
  22. 128
  23. #000000
  24. 12
  25. cyan
  26. green
  27. 48
  28. black
  29. green
  30. 56
  31. magenta
  32. red
  33. red
  34. blue
  35. green
  36. 38
  37. red
  38. white
  39. bright green
  40. #ffffff

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