← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 218 · 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 is rgb(255, 255, 255)? (a) yellow (b) white (c) magenta (d) cyan
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  3. 3.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #ff0000
  4. 4.🌈 Which colour is #ffff00? (a) white (b) cyan (c) yellow (d) red
  5. 5.🌈 Which hex code is magenta? (a) #000000 (b) #0000ff (c) #ffffff (d) #ff00ff
  6. 6.🌈 Which colour of light is strongest in rgb(53, 22, 243)? (a) green (b) red (c) blue
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  8. 8.🌈 Which colour is #ff0000? (a) blue (b) red (c) yellow (d) white
  9. 9.🌈 Which colour is #00ff00? (a) red (b) blue (c) white (d) bright green
  10. 10.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #0000ff (d) #000000
  11. 11.🌈 Which colour of light is strongest in rgb(43, 20, 151)? (a) red (b) green (c) blue
  12. 12.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) blue (d) yellow
  13. 13.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) black (c) white (d) magenta
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  15. 15.🌈 Which hex code is blue? (a) #0000ff (b) #ffffff (c) #00ff00 (d) #ff00ff
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) yellow (c) magenta (d) blue
  17. 17.🌈 In #00c100 the green part is the hex number c1. What is it as a normal number?
  18. 18.🌈 In #00b600 the green part is the hex number b6. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) blue (c) cyan (d) red
  20. 20.🌈 Which colour is #00ffff? (a) bright green (b) black (c) white (d) cyan
  21. 21.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ffff (c) #0000ff (d) #ffffff
  22. 22.🌈 Which colour of light is strongest in rgb(26, 199, 95)? (a) blue (b) green (c) red
  23. 23.🌈 Which colour is #000000? (a) red (b) white (c) blue (d) black
  24. 24.🌈 Which colour of light is strongest in rgb(109, 169, 7)? (a) red (b) blue (c) green
  25. 25.🌈 Which colour of light is strongest in rgb(93, 133, 230)? (a) blue (b) green (c) red
  26. 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  27. 27.🌈 Which colour of light is strongest in rgb(91, 196, 137)? (a) red (b) blue (c) green
  28. 28.🌈 Which colour of light is strongest in rgb(133, 66, 158)? (a) green (b) blue (c) red
  29. 29.🌈 Which hex code is black? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ff00ff
  30. 30.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  31. 31.🌈 Which colour is #ff00ff? (a) red (b) white (c) blue (d) magenta
  32. 32.🌈 In #150000 the red part is the hex number 15. What is it as a normal number?
  33. 33.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?
  34. 34.🌈 In #000e00 the green part is the hex number 0e. What is it as a normal number?
  35. 35.🌈 In #005b00 the green part is the hex number 5b. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(0, 154, 19)? (a) red (b) green (c) blue
  37. 37.🌈 In #d70000 the red part is the hex number d7. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(152, 125, 38)? (a) blue (b) green (c) red
  39. 39.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) cyan (d) red

Answer key

  1. white
  2. blue
  3. #ffff00
  4. yellow
  5. #ff00ff
  6. blue
  7. red
  8. red
  9. bright green
  10. #ff0000
  11. blue
  12. yellow
  13. magenta
  14. 3
  15. #0000ff
  16. blue
  17. 193
  18. 182
  19. red
  20. cyan
  21. #00ffff
  22. green
  23. black
  24. green
  25. blue
  26. F
  27. green
  28. blue
  29. #000000
  30. 255
  31. magenta
  32. 21
  33. 22
  34. 14
  35. 91
  36. green
  37. 215
  38. red
  39. 210
  40. bright green

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