← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 334 · 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 #008e00 the green part is the hex number 8e. What is it as a normal number?
  2. 2.🌈 In #001400 the green part is the hex number 14. What is it as a normal number?
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  4. 4.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ffff00
  5. 5.🌈 Which colour of light is strongest in rgb(2, 76, 208)? (a) green (b) blue (c) red
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  7. 7.🌈 Which colour is #ff0000? (a) bright green (b) cyan (c) red (d) blue
  8. 8.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) cyan
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  10. 10.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ffff00
  11. 11.🌈 Which colour is #00ff00? (a) bright green (b) red (c) magenta (d) yellow
  12. 12.🌈 Which colour of light is strongest in rgb(182, 119, 92)? (a) green (b) blue (c) red
  13. 13.🌈 Which colour of light is strongest in rgb(191, 110, 128)? (a) green (b) blue (c) red
  14. 14.🌈 Which colour of light is strongest in rgb(31, 161, 129)? (a) red (b) blue (c) green
  15. 15.🌈 Which colour of light is strongest in rgb(113, 252, 26)? (a) blue (b) red (c) green
  16. 16.🌈 Which hex code is cyan? (a) #00ffff (b) #ffffff (c) #0000ff (d) #ffff00
  17. 17.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) magenta (d) cyan
  18. 18.🌈 Which colour is #000000? (a) bright green (b) blue (c) white (d) black
  19. 19.🌈 Which colour of light is strongest in rgb(222, 50, 91)? (a) green (b) red (c) blue
  20. 20.🌈 In #00bf00 the green part is the hex number bf. What is it as a normal number?
  21. 21.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) bright green (c) yellow (d) cyan
  22. 22.🌈 Which colour is #ff00ff? (a) black (b) red (c) white (d) magenta
  23. 23.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  24. 24.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) red (d) blue
  25. 25.🌈 Which colour of light is strongest in rgb(196, 112, 98)? (a) red (b) green (c) blue
  26. 26.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #ff0000
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) blue (d) black
  28. 28.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) bright green (d) yellow
  29. 29.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(49, 18, 242)? (a) red (b) blue (c) green
  31. 31.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) bright green (c) blue (d) red
  32. 32.🌈 In #000060 the blue part is the hex number 60. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) white (c) magenta (d) blue
  34. 34.🌈 In #00007a the blue part is the hex number 7a. What is it as a normal number?
  35. 35.🌈 Which hex code is blue? (a) #ffffff (b) #ff0000 (c) #0000ff (d) #ff00ff
  36. 36.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) red (c) white (d) magenta
  37. 37.🌈 Which colour of light is strongest in rgb(80, 58, 164)? (a) blue (b) green (c) red
  38. 38.🌈 In #000031 the blue part is the hex number 31. What is it as a normal number?
  39. 39.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  40. 40.🌈 Which colour of light is strongest in rgb(83, 43, 182)? (a) green (b) red (c) blue

Answer key

  1. 142
  2. 20
  3. red
  4. #00ff00
  5. blue
  6. F
  7. red
  8. blue
  9. 255
  10. #ff0000
  11. bright green
  12. red
  13. red
  14. green
  15. green
  16. #00ffff
  17. yellow
  18. black
  19. red
  20. 191
  21. cyan
  22. magenta
  23. 3
  24. cyan
  25. red
  26. #ff00ff
  27. bright green
  28. blue
  29. 160
  30. blue
  31. red
  32. 96
  33. magenta
  34. 122
  35. #0000ff
  36. white
  37. blue
  38. 49
  39. blue
  40. blue

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