← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 137 · 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(103, 65, 152)? (a) green (b) blue (c) red
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) magenta (c) black (d) bright green
  3. 3.🌈 Which hex code is black? (a) #00ffff (b) #ffffff (c) #000000 (d) #ff00ff
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  5. 5.🌈 Which colour of light is strongest in rgb(99, 182, 35)? (a) blue (b) green (c) red
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  7. 7.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
  8. 8.🌈 In #440000 the red part is the hex number 44. What is it as a normal number?
  9. 9.🌈 In #009f00 the green part is the hex number 9f. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(103, 168, 108)? (a) blue (b) red (c) green
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  12. 12.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) yellow (d) cyan
  13. 13.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) red (d) cyan
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  15. 15.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
  16. 16.🌈 Which hex code is blue? (a) #00ffff (b) #000000 (c) #ff0000 (d) #0000ff
  17. 17.🌈 In #110000 the red part is the hex number 11. What is it as a normal number?
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) bright green (d) red
  19. 19.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) red (d) white
  20. 20.🌈 Which colour of light is strongest in rgb(107, 202, 135)? (a) red (b) blue (c) green
  21. 21.🌈 In #000018 the blue part is the hex number 18. What is it as a normal number?
  22. 22.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ff0000
  23. 23.🌈 Which colour is #ffffff? (a) yellow (b) blue (c) white (d) bright green
  24. 24.🌈 Which colour of light is strongest in rgb(211, 19, 31)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour is #000000? (a) red (b) bright green (c) blue (d) black
  26. 26.🌈 In #00e700 the green part is the hex number e7. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) magenta (c) red (d) blue
  28. 28.🌈 In #000800 the green part is the hex number 08. What is it as a normal number?
  29. 29.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) red (d) magenta
  30. 30.🌈 Which colour of light is strongest in rgb(104, 185, 42)? (a) green (b) red (c) blue
  31. 31.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #00ff00 (d) #0000ff
  32. 32.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #000000 (d) #0000ff
  33. 33.🌈 In #d40000 the red part is the hex number d4. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(30, 90, 163)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(179, 3, 62)? (a) blue (b) green (c) red
  36. 36.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
  37. 37.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ff0000
  38. 38.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) black (d) blue
  39. 39.🌈 Which colour is #ff0000? (a) cyan (b) red (c) bright green (d) blue
  40. 40.🌈 Which colour of light is strongest in rgb(129, 156, 90)? (a) blue (b) red (c) green

Answer key

  1. blue
  2. bright green
  3. #000000
  4. blue
  5. green
  6. red
  7. 52
  8. 68
  9. 159
  10. green
  11. F
  12. black
  13. cyan
  14. 3
  15. 243
  16. #0000ff
  17. 17
  18. red
  19. magenta
  20. green
  21. 24
  22. #00ff00
  23. white
  24. red
  25. black
  26. 231
  27. blue
  28. 8
  29. blue
  30. green
  31. #ffffff
  32. #ffff00
  33. 212
  34. blue
  35. red
  36. 80
  37. #ff0000
  38. yellow
  39. red
  40. green

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