← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 89 · 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 rgb(255, 0, 255)? (a) yellow (b) red (c) blue (d) magenta
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  3. 3.🌈 In #00e800 the green part is the hex number e8. What is it as a normal number?
  4. 4.🌈 Which colour of light is strongest in rgb(81, 215, 12)? (a) green (b) red (c) blue
  5. 5.🌈 In #e20000 the red part is the hex number e2. What is it as a normal number?
  6. 6.🌈 In #310000 the red part is the hex number 31. What is it as a normal number?
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  8. 8.🌈 Which colour is #ffffff? (a) white (b) yellow (c) black (d) red
  9. 9.🌈 Which colour of light is strongest in rgb(46, 255, 8)? (a) blue (b) red (c) green
  10. 10.🌈 Which colour of light is strongest in rgb(33, 32, 165)? (a) green (b) red (c) blue
  11. 11.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #0000ff (d) #ffffff
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  13. 13.🌈 Which colour is #0000ff? (a) white (b) blue (c) bright green (d) magenta
  14. 14.🌈 In #0000d7 the blue part is the hex number d7. What is it as a normal number?
  15. 15.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #ff00ff
  16. 16.🌈 Which colour of light is strongest in rgb(91, 60, 173)? (a) red (b) green (c) blue
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) bright green (d) white
  18. 18.🌈 Which colour of light is strongest in rgb(73, 112, 151)? (a) red (b) green (c) blue
  19. 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  20. 20.🌈 In #009000 the green part is the hex number 90. What is it as a normal number?
  21. 21.🌈 Which hex code is black? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #000000
  22. 22.🌈 In #cb0000 the red part is the hex number cb. What is it as a normal number?
  23. 23.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
  24. 24.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #ff00ff (d) #000000
  25. 25.🌈 In #020000 the red part is the hex number 02. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(65, 158, 20)? (a) blue (b) red (c) green
  27. 27.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #00ffff (d) #ff0000
  28. 28.🌈 Which colour of light is strongest in rgb(117, 225, 83)? (a) blue (b) green (c) red
  29. 29.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
  30. 30.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
  31. 31.🌈 Which colour is #ffff00? (a) blue (b) bright green (c) yellow (d) cyan
  32. 32.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) yellow (d) magenta
  33. 33.🌈 Which colour of light is strongest in rgb(21, 184, 118)? (a) blue (b) red (c) green
  34. 34.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
  35. 35.🌈 Which colour is #00ffff? (a) bright green (b) blue (c) cyan (d) red
  36. 36.🌈 In #760000 the red part is the hex number 76. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) yellow (c) white (d) blue
  38. 38.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(59, 68, 246)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour is #ff0000? (a) red (b) bright green (c) black (d) magenta

Answer key

  1. magenta
  2. blue
  3. 232
  4. green
  5. 226
  6. 49
  7. 255
  8. white
  9. green
  10. blue
  11. #ffff00
  12. red
  13. blue
  14. 215
  15. #ff0000
  16. blue
  17. red
  18. blue
  19. 3
  20. 144
  21. #000000
  22. 203
  23. #00ffff
  24. #ff00ff
  25. 2
  26. green
  27. #0000ff
  28. green
  29. 67
  30. 24
  31. yellow
  32. magenta
  33. green
  34. 246
  35. cyan
  36. 118
  37. white
  38. 0
  39. blue
  40. red

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