← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 156 · 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 of light is strongest in rgb(1, 159, 97)? (a) green (b) blue (c) red
  2. 2.🌈 Which colour is #0000ff? (a) black (b) blue (c) red (d) bright green
  3. 3.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) red (c) bright green (d) white
  4. 4.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
  5. 5.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #000000
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  7. 7.🌈 Which colour is #000000? (a) black (b) cyan (c) bright green (d) yellow
  8. 8.🌈 Which colour of light is strongest in rgb(215, 121, 88)? (a) red (b) green (c) blue
  9. 9.🌈 Which colour of light is strongest in rgb(120, 77, 167)? (a) green (b) red (c) blue
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  11. 11.🌈 Which colour is #00ff00? (a) white (b) red (c) magenta (d) bright green
  12. 12.🌈 Which colour of light is strongest in rgb(188, 83, 63)? (a) green (b) red (c) blue
  13. 13.🌈 Which colour of light is strongest in rgb(83, 23, 177)? (a) green (b) blue (c) red
  14. 14.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) white (d) red
  15. 15.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #ff0000 (d) #00ff00
  16. 16.🌈 Which colour is #ffffff? (a) blue (b) yellow (c) magenta (d) white
  17. 17.🌈 Which colour of light is strongest in rgb(37, 127, 193)? (a) green (b) red (c) blue
  18. 18.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) white (d) blue
  19. 19.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  20. 20.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) yellow (d) white
  21. 21.🌈 Which colour of light is strongest in rgb(90, 19, 176)? (a) red (b) blue (c) green
  22. 22.🌈 In #001300 the green part is the hex number 13. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) bright green (c) red (d) yellow
  24. 24.🌈 Which hex code is yellow? (a) #0000ff (b) #00ff00 (c) #ffff00 (d) #00ffff
  25. 25.🌈 In #000001 the blue part is the hex number 01. What is it as a normal number?
  26. 26.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) red (d) cyan
  27. 27.🌈 Which colour of light is strongest in rgb(55, 1, 162)? (a) red (b) green (c) blue
  28. 28.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) bright green (d) white
  29. 29.🌈 Which colour of light is strongest in rgb(22, 120, 235)? (a) green (b) red (c) blue
  30. 30.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  31. 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  32. 32.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) bright green (c) yellow (d) red
  33. 33.🌈 Which colour is #ffff00? (a) white (b) blue (c) cyan (d) yellow
  34. 34.🌈 Which colour of light is strongest in rgb(115, 242, 117)? (a) blue (b) green (c) red
  35. 35.🌈 In #c90000 the red part is the hex number c9. What is it as a normal number?
  36. 36.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(158, 0, 15)? (a) green (b) red (c) blue
  38. 38.🌈 In #790000 the red part is the hex number 79. What is it as a normal number?
  39. 39.🌈 In #0000a5 the blue part is the hex number a5. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) blue (d) black

Answer key

  1. green
  2. blue
  3. bright green
  4. 0
  5. #0000ff
  6. 255
  7. black
  8. red
  9. blue
  10. F
  11. bright green
  12. red
  13. blue
  14. magenta
  15. #00ff00
  16. white
  17. blue
  18. magenta
  19. red
  20. white
  21. blue
  22. 19
  23. yellow
  24. #ffff00
  25. 1
  26. red
  27. blue
  28. black
  29. blue
  30. blue
  31. 3
  32. red
  33. yellow
  34. green
  35. 201
  36. 171
  37. red
  38. 121
  39. 165
  40. blue

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