← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 264 · 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(7, 126, 154)? (a) green (b) blue (c) red
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  3. 3.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) white (d) magenta
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  7. 7.🌈 Which colour is #ff00ff? (a) black (b) blue (c) magenta (d) bright green
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) white (d) red
  9. 9.🌈 Which colour is #ffff00? (a) white (b) black (c) yellow (d) blue
  10. 10.🌈 In #00007c the blue part is the hex number 7c. What is it as a normal number?
  11. 11.🌈 In #790000 the red part is the hex number 79. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) bright green (d) blue
  13. 13.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) white (c) magenta (d) red
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  15. 15.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) cyan (c) red (d) magenta
  16. 16.🌈 Which colour is #000000? (a) bright green (b) yellow (c) cyan (d) black
  17. 17.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
  18. 18.🌈 In #008600 the green part is the hex number 86. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(53, 252, 10)? (a) green (b) red (c) blue
  20. 20.🌈 Which hex code is black? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ff00ff
  21. 21.🌈 Which colour is #ff0000? (a) magenta (b) black (c) red (d) bright green
  22. 22.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #ff0000
  23. 23.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) magenta (c) white (d) yellow
  24. 24.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ff00
  25. 25.🌈 Which colour is #00ffff? (a) red (b) cyan (c) white (d) bright green
  26. 26.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) blue (c) black (d) bright green
  27. 27.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(31, 188, 97)? (a) red (b) blue (c) green
  29. 29.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(126, 176, 10)? (a) blue (b) green (c) red
  31. 31.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) blue (d) black
  32. 32.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
  33. 33.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #0000ff
  34. 34.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #00ffff
  35. 35.🌈 Which colour is #ffffff? (a) black (b) white (c) blue (d) red
  36. 36.🌈 Which colour of light is strongest in rgb(245, 58, 140)? (a) green (b) red (c) blue
  37. 37.🌈 Which colour is #00ff00? (a) yellow (b) red (c) bright green (d) white
  38. 38.🌈 Which colour of light is strongest in rgb(115, 64, 240)? (a) red (b) green (c) blue
  39. 39.🌈 Which colour of light is strongest in rgb(2, 174, 113)? (a) blue (b) green (c) red
  40. 40.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?

Answer key

  1. blue
  2. blue
  3. black
  4. red
  5. 255
  6. 3
  7. magenta
  8. cyan
  9. yellow
  10. 124
  11. 121
  12. bright green
  13. red
  14. F
  15. magenta
  16. black
  17. 112
  18. 134
  19. green
  20. #000000
  21. red
  22. #0000ff
  23. yellow
  24. #ffffff
  25. cyan
  26. blue
  27. 27
  28. green
  29. 65
  30. green
  31. white
  32. 132
  33. #00ff00
  34. #00ffff
  35. white
  36. red
  37. bright green
  38. blue
  39. green
  40. 160

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