← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 119 · 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(194, 6, 41)? (a) green (b) red (c) blue
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  3. 3.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) white (c) blue (d) bright green
  4. 4.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  6. 6.🌈 Which colour is #ffffff? (a) blue (b) yellow (c) white (d) magenta
  7. 7.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
  8. 8.🌈 Which colour is #00ffff? (a) bright green (b) yellow (c) red (d) cyan
  9. 9.🌈 In #00005e the blue part is the hex number 5e. What is it as a normal number?
  10. 10.🌈 In #000026 the blue part is the hex number 26. What is it as a normal number?
  11. 11.🌈 Which colour is #ffff00? (a) red (b) bright green (c) yellow (d) black
  12. 12.🌈 In #005d00 the green part is the hex number 5d. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(173, 133, 133)? (a) red (b) blue (c) green
  14. 14.🌈 Which colour of light is strongest in rgb(173, 37, 118)? (a) red (b) blue (c) green
  15. 15.🌈 Which colour of light is strongest in rgb(126, 202, 34)? (a) red (b) blue (c) green
  16. 16.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) white (c) yellow (d) black
  17. 17.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) red (d) bright green
  18. 18.🌈 Which hex code is cyan? (a) #000000 (b) #ffffff (c) #00ffff (d) #ffff00
  19. 19.🌈 Which hex code is bright green? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #00ffff
  20. 20.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ffff00
  21. 21.🌈 Which colour of light is strongest in rgb(230, 50, 47)? (a) green (b) blue (c) red
  22. 22.🌈 Which colour is #ff0000? (a) magenta (b) red (c) white (d) black
  23. 23.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ffff00
  24. 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  25. 25.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) red (d) black
  26. 26.🌈 In #004400 the green part is the hex number 44. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) white (c) yellow (d) blue
  28. 28.🌈 Which hex code is blue? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #0000ff
  29. 29.🌈 In #000045 the blue part is the hex number 45. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(242, 64, 106)? (a) blue (b) green (c) red
  31. 31.🌈 Which colour of light is strongest in rgb(176, 73, 140)? (a) red (b) blue (c) green
  32. 32.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  33. 33.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  34. 34.🌈 Which colour of light is strongest in rgb(49, 85, 163)? (a) blue (b) red (c) green
  35. 35.🌈 Which colour is #000000? (a) white (b) blue (c) cyan (d) black
  36. 36.🌈 Which colour of light is strongest in rgb(39, 100, 163)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour is #00ff00? (a) red (b) yellow (c) bright green (d) cyan
  38. 38.🌈 In #a90000 the red part is the hex number a9. What is it as a normal number?
  39. 39.🌈 In #c20000 the red part is the hex number c2. What is it as a normal number?
  40. 40.🌈 In #0000a6 the blue part is the hex number a6. What is it as a normal number?

Answer key

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

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