← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 227 · 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.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  2. 2.🌈 Which colour is #0000ff? (a) bright green (b) black (c) white (d) blue
  3. 3.🌈 Which hex code is red? (a) #ffff00 (b) #00ff00 (c) #000000 (d) #ff0000
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
  5. 5.🌈 Which colour of light is strongest in rgb(120, 77, 195)? (a) red (b) blue (c) green
  6. 6.🌈 Which colour is #00ff00? (a) bright green (b) black (c) blue (d) yellow
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  8. 8.🌈 Which colour of light is strongest in rgb(137, 2, 184)? (a) blue (b) green (c) red
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  10. 10.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
  11. 11.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #00ff00 (d) #ffff00
  12. 12.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
  13. 13.🌈 In #9d0000 the red part is the hex number 9d. What is it as a normal number?
  14. 14.🌈 In #3f0000 the red part is the hex number 3f. What is it as a normal number?
  15. 15.🌈 Which colour of light is strongest in rgb(88, 25, 213)? (a) green (b) blue (c) red
  16. 16.🌈 Which colour of light is strongest in rgb(204, 44, 1)? (a) blue (b) green (c) red
  17. 17.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
  18. 18.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
  19. 19.🌈 Which colour is #ff0000? (a) black (b) red (c) magenta (d) bright green
  20. 20.🌈 Which hex code is blue? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #ffffff
  21. 21.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) bright green (d) blue
  22. 22.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) yellow (d) black
  23. 23.🌈 Which colour is #ffffff? (a) blue (b) red (c) black (d) white
  24. 24.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
  25. 25.🌈 In #00e500 the green part is the hex number e5. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) bright green (d) black
  27. 27.🌈 Which colour of light is strongest in rgb(73, 253, 98)? (a) red (b) green (c) blue
  28. 28.🌈 In #000a00 the green part is the hex number 0a. What is it as a normal number?
  29. 29.🌈 In #0000f4 the blue part is the hex number f4. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) magenta (d) cyan
  31. 31.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) red (d) white
  32. 32.🌈 In #1f0000 the red part is the hex number 1f. What is it as a normal number?
  33. 33.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  34. 34.🌈 Which colour of light is strongest in rgb(68, 96, 184)? (a) green (b) blue (c) red
  35. 35.🌈 Which colour of light is strongest in rgb(129, 170, 27)? (a) blue (b) red (c) green
  36. 36.🌈 In #000073 the blue part is the hex number 73. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(34, 171, 3)? (a) red (b) blue (c) green
  38. 38.🌈 Which colour is #000000? (a) red (b) black (c) blue (d) magenta
  39. 39.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) black (c) red (d) cyan
  40. 40.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #ffffff

Answer key

  1. blue
  2. blue
  3. #ff0000
  4. red
  5. blue
  6. bright green
  7. 3
  8. blue
  9. F
  10. 188
  11. #00ff00
  12. 213
  13. 157
  14. 63
  15. blue
  16. red
  17. 18
  18. 17
  19. red
  20. #0000ff
  21. magenta
  22. blue
  23. white
  24. 24
  25. 229
  26. red
  27. green
  28. 10
  29. 244
  30. black
  31. yellow
  32. 31
  33. 255
  34. blue
  35. green
  36. 115
  37. green
  38. black
  39. cyan
  40. #000000

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