← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 221 · 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) black (b) blue (c) bright green (d) red
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  3. 3.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #00ffff
  4. 4.🌈 Which colour is #0000ff? (a) red (b) bright green (c) blue (d) white
  5. 5.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
  6. 6.🌈 Which colour of light is strongest in rgb(179, 1, 60)? (a) red (b) green (c) blue
  7. 7.🌈 In #0000fb the blue part is the hex number fb. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) red (c) white (d) cyan
  9. 9.🌈 Which colour is #ff0000? (a) white (b) cyan (c) red (d) black
  10. 10.🌈 Which colour is #ffff00? (a) red (b) blue (c) cyan (d) yellow
  11. 11.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
  12. 12.🌈 Which colour of light is strongest in rgb(229, 36, 34)? (a) blue (b) red (c) green
  13. 13.🌈 Which colour of light is strongest in rgb(8, 26, 173)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) red (c) blue (d) magenta
  15. 15.🌈 In #ad0000 the red part is the hex number ad. What is it as a normal number?
  16. 16.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #0000ff
  17. 17.🌈 Which colour is #ffffff? (a) cyan (b) magenta (c) white (d) red
  18. 18.🌈 In #000090 the blue part is the hex number 90. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(30, 236, 74)? (a) green (b) blue (c) red
  20. 20.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
  21. 21.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  22. 22.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) black (d) magenta
  23. 23.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #0000ff (d) #ff0000
  24. 24.🌈 Which hex code is blue? (a) #00ffff (b) #00ff00 (c) #0000ff (d) #ff0000
  25. 25.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
  26. 26.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) yellow (d) red
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  28. 28.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) blue (c) red (d) white
  29. 29.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) blue (d) bright green
  30. 30.🌈 Which colour of light is strongest in rgb(106, 160, 12)? (a) red (b) green (c) blue
  31. 31.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) cyan (c) bright green (d) blue
  33. 33.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  34. 34.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) cyan (c) red (d) blue
  35. 35.🌈 In #740000 the red part is the hex number 74. What is it as a normal number?
  36. 36.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) yellow (d) red
  37. 37.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
  38. 38.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #00ff00 (d) #ff0000
  39. 39.🌈 In #001f00 the green part is the hex number 1f. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(160, 121, 73)? (a) blue (b) green (c) red

Answer key

  1. black
  2. 3
  3. #ff00ff
  4. blue
  5. 71
  6. red
  7. 251
  8. cyan
  9. red
  10. yellow
  11. 255
  12. red
  13. blue
  14. magenta
  15. 173
  16. #00ffff
  17. white
  18. 144
  19. green
  20. 30
  21. red
  22. bright green
  23. #00ff00
  24. #0000ff
  25. 12
  26. cyan
  27. blue
  28. white
  29. black
  30. green
  31. 63
  32. bright green
  33. F
  34. red
  35. 116
  36. magenta
  37. 67
  38. #000000
  39. 31
  40. red

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