← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 123 · 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(53, 210, 10)? (a) red (b) green (c) blue
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) red (c) bright green (d) cyan
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  5. 5.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
  6. 6.🌈 In #bd0000 the red part is the hex number bd. What is it as a normal number?
  7. 7.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  9. 9.🌈 In #ef0000 the red part is the hex number ef. What is it as a normal number?
  10. 10.🌈 Which colour is #0000ff? (a) blue (b) black (c) red (d) bright green
  11. 11.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) bright green (d) black
  12. 12.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ff0000
  13. 13.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
  14. 14.🌈 Which hex code is blue? (a) #ff00ff (b) #0000ff (c) #ffffff (d) #ffff00
  15. 15.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) white (d) magenta
  16. 16.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #0000ff (d) #ff00ff
  17. 17.🌈 Which hex code is red? (a) #00ffff (b) #ff00ff (c) #ff0000 (d) #000000
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  19. 19.🌈 In #000088 the blue part is the hex number 88. What is it as a normal number?
  20. 20.🌈 In #a80000 the red part is the hex number a8. What is it as a normal number?
  21. 21.🌈 In #000019 the blue part is the hex number 19. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(150, 63, 30)? (a) red (b) blue (c) green
  23. 23.🌈 Which colour of light is strongest in rgb(132, 78, 191)? (a) red (b) blue (c) green
  24. 24.🌈 In #000031 the blue part is the hex number 31. What is it as a normal number?
  25. 25.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
  26. 26.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) black (d) blue
  27. 27.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
  28. 28.🌈 Which colour is #ffff00? (a) black (b) magenta (c) yellow (d) bright green
  29. 29.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  30. 30.🌈 Which hex code is white? (a) #ffffff (b) #000000 (c) #0000ff (d) #ff0000
  31. 31.🌈 Which colour of light is strongest in rgb(99, 180, 96)? (a) blue (b) green (c) red
  32. 32.🌈 Which colour is #ff00ff? (a) red (b) bright green (c) blue (d) magenta
  33. 33.🌈 Which colour of light is strongest in rgb(16, 96, 176)? (a) red (b) blue (c) green
  34. 34.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) blue (c) bright green (d) yellow
  35. 35.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
  36. 36.🌈 Which colour is #00ffff? (a) blue (b) white (c) cyan (d) bright green
  37. 37.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) red (d) cyan
  38. 38.🌈 Which colour is #000000? (a) blue (b) magenta (c) black (d) white
  39. 39.🌈 In #0000ae the blue part is the hex number ae. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(173, 87, 113)? (a) red (b) green (c) blue

Answer key

  1. green
  2. blue
  3. cyan
  4. 3
  5. 9
  6. 189
  7. 52
  8. F
  9. 239
  10. blue
  11. yellow
  12. #000000
  13. 34
  14. #0000ff
  15. black
  16. #ff00ff
  17. #ff0000
  18. 255
  19. 136
  20. 168
  21. 25
  22. red
  23. blue
  24. 49
  25. 51
  26. bright green
  27. 229
  28. yellow
  29. red
  30. #ffffff
  31. green
  32. magenta
  33. blue
  34. magenta
  35. 141
  36. cyan
  37. red
  38. black
  39. 174
  40. red

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