← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 279 · 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 #0000ff? (a) magenta (b) white (c) blue (d) bright green
  2. 2.🌈 Which colour is #000000? (a) blue (b) cyan (c) bright green (d) black
  3. 3.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #ffffff
  4. 4.🌈 Which hex code is magenta? (a) #00ffff (b) #ffffff (c) #ff0000 (d) #ff00ff
  5. 5.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) magenta (c) white (d) black
  6. 6.🌈 Which colour is #ff00ff? (a) cyan (b) white (c) black (d) magenta
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
  9. 9.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) black (c) white (d) yellow
  10. 10.🌈 In #b50000 the red part is the hex number b5. What is it as a normal number?
  11. 11.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #000000
  12. 12.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) white (c) bright green (d) red
  13. 13.🌈 Which hex code is white? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ffffff
  14. 14.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) magenta (c) blue (d) cyan
  15. 15.🌈 In #000400 the green part is the hex number 04. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(236, 88, 51)? (a) green (b) red (c) blue
  17. 17.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #ffff00
  18. 18.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) bright green (c) white (d) magenta
  19. 19.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) red (d) black
  20. 20.🌈 In #00e200 the green part is the hex number e2. What is it as a normal number?
  21. 21.🌈 In #0000b8 the blue part is the hex number b8. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(211, 80, 82)? (a) blue (b) red (c) green
  23. 23.🌈 In #4f0000 the red part is the hex number 4f. What is it as a normal number?
  24. 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  25. 25.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  26. 26.🌈 In #00e800 the green part is the hex number e8. What is it as a normal number?
  27. 27.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
  28. 28.🌈 In #0000da the blue part is the hex number da. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(156, 46, 44)? (a) blue (b) green (c) red
  30. 30.🌈 In #00005a the blue part is the hex number 5a. What is it as a normal number?
  31. 31.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  32. 32.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) magenta (c) yellow (d) red
  33. 33.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
  34. 34.🌈 Which colour is #ffff00? (a) yellow (b) magenta (c) white (d) blue
  35. 35.🌈 Which colour of light is strongest in rgb(197, 54, 59)? (a) green (b) blue (c) red
  36. 36.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
  37. 37.🌈 Which colour is #ffffff? (a) blue (b) black (c) magenta (d) white
  38. 38.🌈 In #000064 the blue part is the hex number 64. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(88, 72, 223)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(196, 96, 4)? (a) green (b) blue (c) red

Answer key

  1. blue
  2. black
  3. #ff0000
  4. #ff00ff
  5. black
  6. magenta
  7. F
  8. red
  9. yellow
  10. 181
  11. #000000
  12. red
  13. #ffffff
  14. cyan
  15. 4
  16. red
  17. #ffff00
  18. bright green
  19. white
  20. 226
  21. 184
  22. red
  23. 79
  24. 3
  25. 255
  26. 232
  27. 112
  28. 218
  29. red
  30. 90
  31. blue
  32. magenta
  33. 67
  34. yellow
  35. red
  36. 105
  37. white
  38. 100
  39. blue
  40. red

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