← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 354 · 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) bright green (b) white (c) blue (d) black
  2. 2.🌈 In #007000 the green part is the hex number 70. What is it as a normal number?
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) blue (c) black (d) red
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  5. 5.🌈 In #af0000 the red part is the hex number af. What is it as a normal number?
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  7. 7.🌈 In #000600 the green part is the hex number 06. What is it as a normal number?
  8. 8.🌈 In #000073 the blue part is the hex number 73. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) bright green (d) black
  10. 10.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) white (c) magenta (d) red
  11. 11.🌈 Which colour of light is strongest in rgb(112, 38, 238)? (a) blue (b) red (c) green
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  13. 13.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ff00ff
  14. 14.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
  15. 15.🌈 Which hex code is cyan? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #ffffff
  16. 16.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) red (c) white (d) cyan
  17. 17.🌈 Which hex code is red? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #00ff00
  18. 18.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) black (d) cyan
  19. 19.🌈 Which colour of light is strongest in rgb(3, 211, 122)? (a) red (b) blue (c) green
  20. 20.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) blue (d) magenta
  21. 21.🌈 Which colour of light is strongest in rgb(14, 56, 151)? (a) blue (b) green (c) red
  22. 22.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
  23. 23.🌈 Which hex code is black? (a) #00ffff (b) #000000 (c) #ff00ff (d) #ffffff
  24. 24.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #ffff00
  25. 25.🌈 Which colour of light is strongest in rgb(91, 216, 52)? (a) green (b) blue (c) red
  26. 26.🌈 Which colour of light is strongest in rgb(55, 195, 72)? (a) red (b) green (c) blue
  27. 27.🌈 In #5b0000 the red part is the hex number 5b. What is it as a normal number?
  28. 28.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) magenta (d) blue
  29. 29.🌈 Which colour is #00ffff? (a) cyan (b) white (c) magenta (d) black
  30. 30.🌈 Which colour of light is strongest in rgb(252, 118, 18)? (a) blue (b) red (c) green
  31. 31.🌈 In #0000dc the blue part is the hex number dc. What is it as a normal number?
  32. 32.🌈 In #6e0000 the red part is the hex number 6e. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) red (c) white (d) cyan
  34. 34.🌈 Which colour is #ffff00? (a) red (b) magenta (c) blue (d) yellow
  35. 35.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) white (d) red
  36. 36.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  37. 37.🌈 Which colour of light is strongest in rgb(161, 112, 55)? (a) red (b) green (c) blue
  38. 38.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
  39. 39.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ff00ff
  40. 40.🌈 In #009700 the green part is the hex number 97. What is it as a normal number?

Answer key

  1. black
  2. 112
  3. red
  4. F
  5. 175
  6. 3
  7. 6
  8. 115
  9. black
  10. magenta
  11. blue
  12. 255
  13. #0000ff
  14. 127
  15. #00ffff
  16. white
  17. #ff0000
  18. blue
  19. green
  20. magenta
  21. blue
  22. 0
  23. #000000
  24. #ff00ff
  25. green
  26. green
  27. 91
  28. bright green
  29. cyan
  30. red
  31. 220
  32. 110
  33. cyan
  34. yellow
  35. bright green
  36. blue
  37. red
  38. 11
  39. #00ff00
  40. 151

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