← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 265 · 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 #ffff00? (a) red (b) white (c) black (d) yellow
  2. 2.🌈 Which colour of light is strongest in rgb(2, 12, 233)? (a) blue (b) green (c) red
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  4. 4.🌈 Which hex code is blue? (a) #0000ff (b) #ffff00 (c) #00ffff (d) #ff00ff
  5. 5.🌈 Which colour of light is strongest in rgb(211, 64, 18)? (a) green (b) blue (c) red
  6. 6.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) yellow (d) white
  7. 7.🌈 Which hex code is yellow? (a) #00ffff (b) #ff0000 (c) #0000ff (d) #ffff00
  8. 8.🌈 In #00a200 the green part is the hex number a2. What is it as a normal number?
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  10. 10.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
  11. 11.🌈 Which colour is #000000? (a) blue (b) red (c) yellow (d) black
  12. 12.🌈 Which colour of light is strongest in rgb(225, 58, 5)? (a) green (b) red (c) blue
  13. 13.🌈 In #00e000 the green part is the hex number e0. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) cyan (c) bright green (d) magenta
  15. 15.🌈 Which colour of light is strongest in rgb(109, 125, 224)? (a) blue (b) red (c) green
  16. 16.🌈 Which hex code is white? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #ffffff
  17. 17.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  18. 18.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(34, 202, 30)? (a) blue (b) red (c) green
  20. 20.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) red (c) blue (d) magenta
  21. 21.🌈 Which colour of light is strongest in rgb(38, 173, 109)? (a) blue (b) green (c) red
  22. 22.🌈 Which colour is #ffffff? (a) bright green (b) black (c) white (d) red
  23. 23.🌈 In #970000 the red part is the hex number 97. What is it as a normal number?
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) black (d) bright green
  25. 25.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
  26. 26.🌈 Which colour of light is strongest in rgb(27, 115, 247)? (a) green (b) blue (c) red
  27. 27.🌈 Which colour is #ff0000? (a) red (b) white (c) yellow (d) black
  28. 28.🌈 Which hex code is cyan? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ff00ff
  29. 29.🌈 Which colour is #00ffff? (a) blue (b) white (c) magenta (d) cyan
  30. 30.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  31. 31.🌈 Which hex code is magenta? (a) #ffffff (b) #000000 (c) #ff00ff (d) #0000ff
  32. 32.🌈 Which colour is #00ff00? (a) red (b) yellow (c) black (d) bright green
  33. 33.🌈 Which colour is #0000ff? (a) cyan (b) magenta (c) blue (d) white
  34. 34.🌈 Which colour of light is strongest in rgb(54, 75, 167)? (a) red (b) green (c) blue
  35. 35.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #0000ff (d) #00ff00
  36. 36.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #0000ff (d) #00ff00
  37. 37.🌈 Which colour of light is strongest in rgb(237, 42, 136)? (a) blue (b) red (c) green
  38. 38.🌈 Which colour of light is strongest in rgb(246, 27, 7)? (a) green (b) red (c) blue
  39. 39.🌈 In #f70000 the red part is the hex number f7. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) white (c) red (d) bright green

Answer key

  1. yellow
  2. blue
  3. F
  4. #0000ff
  5. red
  6. cyan
  7. #ffff00
  8. 162
  9. red
  10. 67
  11. black
  12. red
  13. 224
  14. red
  15. blue
  16. #ffffff
  17. 241
  18. 71
  19. green
  20. blue
  21. green
  22. white
  23. 151
  24. white
  25. 3
  26. blue
  27. red
  28. #00ffff
  29. cyan
  30. blue
  31. #ff00ff
  32. bright green
  33. blue
  34. blue
  35. #00ff00
  36. #000000
  37. red
  38. red
  39. 247
  40. bright green

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