← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 16 · 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(200, 85, 118)? (a) green (b) blue (c) red
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  3. 3.🌈 Which colour of light is strongest in rgb(133, 244, 7)? (a) green (b) blue (c) red
  4. 4.🌈 Which colour of light is strongest in rgb(62, 46, 152)? (a) blue (b) red (c) green
  5. 5.🌈 In #005f00 the green part is the hex number 5f. What is it as a normal number?
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  7. 7.🌈 Which hex code is yellow? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #ffff00
  8. 8.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) white (d) blue
  9. 9.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
  10. 10.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) blue
  11. 11.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #ffff00 (d) #000000
  12. 12.🌈 In #0000be the blue part is the hex number be. What is it as a normal number?
  13. 13.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  14. 14.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) white (c) magenta (d) cyan
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  17. 17.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffff00
  18. 18.🌈 Which hex code is red? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #00ffff
  19. 19.🌈 Which colour of light is strongest in rgb(116, 25, 247)? (a) blue (b) green (c) red
  20. 20.🌈 Which colour of light is strongest in rgb(159, 45, 77)? (a) blue (b) green (c) red
  21. 21.🌈 Which colour is #00ff00? (a) black (b) bright green (c) magenta (d) cyan
  22. 22.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(47, 91, 210)? (a) blue (b) green (c) red
  24. 24.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) white (d) yellow
  25. 25.🌈 Which colour is #ffffff? (a) bright green (b) white (c) red (d) blue
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) black (c) blue (d) bright green
  27. 27.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) red (d) yellow
  28. 28.🌈 Which colour of light is strongest in rgb(197, 7, 49)? (a) red (b) blue (c) green
  29. 29.🌈 Which colour is #ff0000? (a) red (b) white (c) magenta (d) cyan
  30. 30.🌈 In #0000ea the blue part is the hex number ea. What is it as a normal number?
  31. 31.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
  32. 32.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(106, 243, 136)? (a) blue (b) red (c) green
  34. 34.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) cyan (c) black (d) blue
  35. 35.🌈 Which colour of light is strongest in rgb(211, 84, 101)? (a) green (b) red (c) blue
  36. 36.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
  37. 37.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) red
  38. 38.🌈 Which colour is #0000ff? (a) yellow (b) red (c) blue (d) white
  39. 39.🌈 Which hex code is blue? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #0000ff
  40. 40.🌈 Which colour of light is strongest in rgb(121, 245, 104)? (a) green (b) blue (c) red

Answer key

  1. red
  2. red
  3. green
  4. blue
  5. 95
  6. blue
  7. #ffff00
  8. bright green
  9. 115
  10. yellow
  11. #000000
  12. 190
  13. 255
  14. cyan
  15. F
  16. 3
  17. #ff00ff
  18. #ff0000
  19. blue
  20. red
  21. bright green
  22. 211
  23. blue
  24. red
  25. white
  26. magenta
  27. magenta
  28. red
  29. red
  30. 234
  31. 24
  32. 69
  33. green
  34. blue
  35. red
  36. 126
  37. cyan
  38. blue
  39. #0000ff
  40. green

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