← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 197 · 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 #ff0000? (a) yellow (b) red (c) bright green (d) magenta
  2. 2.🌈 Which hex code is cyan? (a) #00ffff (b) #0000ff (c) #00ff00 (d) #ffffff
  3. 3.🌈 Which colour is #000000? (a) white (b) black (c) blue (d) bright green
  4. 4.🌈 Which colour of light is strongest in rgb(194, 35, 12)? (a) red (b) blue (c) green
  5. 5.🌈 In #4c0000 the red part is the hex number 4c. What is it as a normal number?
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  7. 7.🌈 Which colour of light is strongest in rgb(40, 93, 217)? (a) blue (b) red (c) green
  8. 8.🌈 Which colour is #00ffff? (a) white (b) cyan (c) magenta (d) bright green
  9. 9.🌈 Which hex code is blue? (a) #ffff00 (b) #00ffff (c) #000000 (d) #0000ff
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  11. 11.🌈 Which hex code is magenta? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #00ff00
  12. 12.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #0000ff
  13. 13.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) white (d) magenta
  14. 14.🌈 Which colour is #ffffff? (a) white (b) cyan (c) blue (d) red
  15. 15.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) yellow (d) red
  16. 16.🌈 Which colour of light is strongest in rgb(38, 92, 235)? (a) green (b) blue (c) red
  17. 17.🌈 Which colour of light is strongest in rgb(4, 165, 116)? (a) green (b) blue (c) red
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  19. 19.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
  20. 20.🌈 In #000000 the red part is the hex number 00. What is it as a normal number?
  21. 21.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  22. 22.🌈 In #00e500 the green part is the hex number e5. What is it as a normal number?
  23. 23.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #00ffff
  24. 24.🌈 Which colour of light is strongest in rgb(11, 26, 219)? (a) blue (b) red (c) green
  25. 25.🌈 Which colour of light is strongest in rgb(219, 38, 70)? (a) green (b) blue (c) red
  26. 26.🌈 In #1a0000 the red part is the hex number 1a. What is it as a normal number?
  27. 27.🌈 In #0000cb the blue part is the hex number cb. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) red (c) cyan (d) yellow
  29. 29.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ff00ff
  30. 30.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
  31. 31.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) blue (d) magenta
  32. 32.🌈 Which colour is #ff00ff? (a) black (b) cyan (c) blue (d) magenta
  33. 33.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) black (c) cyan (d) red
  34. 34.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) bright green (c) white (d) red
  36. 36.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
  37. 37.🌈 In #00f600 the green part is the hex number f6. What is it as a normal number?
  38. 38.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(74, 183, 8)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) yellow (c) magenta (d) bright green

Answer key

  1. red
  2. #00ffff
  3. black
  4. red
  5. 76
  6. blue
  7. blue
  8. cyan
  9. #0000ff
  10. 3
  11. #ff00ff
  12. #000000
  13. black
  14. white
  15. bright green
  16. blue
  17. green
  18. 255
  19. 235
  20. 0
  21. red
  22. 229
  23. #ff0000
  24. blue
  25. red
  26. 26
  27. 203
  28. yellow
  29. #00ff00
  30. 64
  31. blue
  32. magenta
  33. red
  34. 55
  35. white
  36. 178
  37. 246
  38. 164
  39. green
  40. magenta

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