← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 65 · 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 hex code is black? (a) #0000ff (b) #ffffff (c) #000000 (d) #ff00ff
  2. 2.🌈 Which colour of light is strongest in rgb(109, 116, 218)? (a) blue (b) green (c) red
  3. 3.🌈 Which colour is #ffff00? (a) red (b) white (c) blue (d) yellow
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  6. 6.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #ffff00
  7. 7.🌈 In #00a900 the green part is the hex number a9. What is it as a normal number?
  8. 8.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
  9. 9.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) yellow (c) cyan (d) white
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) yellow (d) white
  12. 12.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) bright green (c) magenta (d) blue
  13. 13.🌈 Which colour of light is strongest in rgb(96, 197, 106)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) cyan (d) yellow
  15. 15.🌈 Which colour of light is strongest in rgb(30, 117, 150)? (a) green (b) red (c) blue
  16. 16.🌈 Which colour is #00ff00? (a) blue (b) red (c) bright green (d) black
  17. 17.🌈 Which hex code is magenta? (a) #00ffff (b) #ff0000 (c) #00ff00 (d) #ff00ff
  18. 18.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) white (d) red
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) yellow (d) red
  20. 20.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
  21. 21.🌈 Which hex code is cyan? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #00ffff
  22. 22.🌈 Which colour of light is strongest in rgb(253, 32, 33)? (a) blue (b) green (c) red
  23. 23.🌈 Which colour of light is strongest in rgb(43, 248, 46)? (a) green (b) blue (c) red
  24. 24.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
  25. 25.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
  26. 26.🌈 In #000061 the blue part is the hex number 61. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(69, 124, 182)? (a) green (b) blue (c) red
  28. 28.🌈 Which hex code is yellow? (a) #00ffff (b) #ffffff (c) #ff0000 (d) #ffff00
  29. 29.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #00ff00
  30. 30.🌈 Which colour of light is strongest in rgb(55, 158, 75)? (a) red (b) green (c) blue
  31. 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  32. 32.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
  33. 33.🌈 In #005a00 the green part is the hex number 5a. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(237, 40, 3)? (a) blue (b) red (c) green
  35. 35.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
  36. 36.🌈 In #410000 the red part is the hex number 41. What is it as a normal number?
  37. 37.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
  38. 38.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
  39. 39.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
  40. 40.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?

Answer key

  1. #000000
  2. blue
  3. yellow
  4. red
  5. 255
  6. #ff0000
  7. 169
  8. 92
  9. 241
  10. cyan
  11. red
  12. bright green
  13. green
  14. blue
  15. blue
  16. bright green
  17. #ff00ff
  18. blue
  19. black
  20. 188
  21. #00ffff
  22. red
  23. green
  24. 96
  25. 160
  26. 97
  27. blue
  28. #ffff00
  29. #ffffff
  30. green
  31. F
  32. 75
  33. 90
  34. red
  35. 235
  36. 65
  37. 172
  38. 56
  39. 8
  40. 176

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