← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 94 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
  2. 2.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
  3. 3.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) blue (c) cyan (d) yellow
  4. 4.🌈 Which colour is #ffff00? (a) red (b) yellow (c) white (d) magenta
  5. 5.🌈 Which colour of light is strongest in rgb(114, 20, 173)? (a) blue (b) red (c) green
  6. 6.🌈 Which hex code is white? (a) #0000ff (b) #00ffff (c) #ffffff (d) #000000
  7. 7.🌈 Which colour of light is strongest in rgb(91, 80, 168)? (a) blue (b) green (c) red
  8. 8.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #000000 (d) #ff00ff
  9. 9.🌈 Which hex code is blue? (a) #00ffff (b) #000000 (c) #ff00ff (d) #0000ff
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  11. 11.🌈 In #00cc00 the green part is the hex number cc. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(34, 172, 23)? (a) green (b) blue (c) red
  13. 13.🌈 Which colour of light is strongest in rgb(61, 174, 37)? (a) green (b) red (c) blue
  14. 14.🌈 Which colour is #ffffff? (a) red (b) magenta (c) bright green (d) white
  15. 15.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) red (d) yellow
  16. 16.🌈 Which colour is #0000ff? (a) red (b) blue (c) white (d) yellow
  17. 17.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #00ff00 (d) #ff0000
  18. 18.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) magenta (c) red (d) cyan
  20. 20.🌈 Which colour is #ff0000? (a) white (b) red (c) magenta (d) cyan
  21. 21.🌈 Which colour is #000000? (a) white (b) red (c) black (d) blue
  22. 22.🌈 Which colour is #00ff00? (a) magenta (b) cyan (c) yellow (d) bright green
  23. 23.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) blue (d) black
  24. 24.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  25. 25.🌈 In #000055 the blue part is the hex number 55. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) cyan (c) yellow (d) magenta
  27. 27.🌈 Which colour is #00ffff? (a) black (b) white (c) bright green (d) cyan
  28. 28.🌈 Which colour of light is strongest in rgb(27, 5, 160)? (a) blue (b) red (c) green
  29. 29.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  30. 30.🌈 Which colour of light is strongest in rgb(80, 27, 227)? (a) green (b) red (c) blue
  31. 31.🌈 Which colour of light is strongest in rgb(199, 67, 12)? (a) red (b) green (c) blue
  32. 32.🌈 Which colour of light is strongest in rgb(43, 90, 188)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(39, 9, 226)? (a) blue (b) green (c) red
  34. 34.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
  35. 35.🌈 Which hex code is magenta? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #ff00ff
  36. 36.🌈 In #c30000 the red part is the hex number c3. What is it as a normal number?
  37. 37.🌈 In #0000b3 the blue part is the hex number b3. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(23, 29, 154)? (a) blue (b) green (c) red
  39. 39.🌈 In #000015 the blue part is the hex number 15. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(178, 118, 126)? (a) green (b) red (c) blue

Answer key

  1. 3
  2. 57
  3. yellow
  4. yellow
  5. blue
  6. #ffffff
  7. blue
  8. #ff0000
  9. #0000ff
  10. red
  11. 204
  12. green
  13. green
  14. white
  15. black
  16. blue
  17. #000000
  18. 172
  19. cyan
  20. red
  21. black
  22. bright green
  23. white
  24. 255
  25. 85
  26. magenta
  27. cyan
  28. blue
  29. blue
  30. blue
  31. red
  32. blue
  33. blue
  34. 28
  35. #ff00ff
  36. 195
  37. 179
  38. blue
  39. 21
  40. red

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