← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 135 · 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, 0, 255)? (a) white (b) magenta (c) red (d) yellow
  2. 2.🌈 Which hex code is black? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ff00
  3. 3.🌈 Which hex code is white? (a) #ffff00 (b) #ff00ff (c) #ff0000 (d) #ffffff
  4. 4.🌈 Which colour of light is strongest in rgb(151, 123, 135)? (a) green (b) red (c) blue
  5. 5.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) yellow (c) bright green (d) red
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  7. 7.🌈 Which colour is #ff0000? (a) red (b) cyan (c) blue (d) yellow
  8. 8.🌈 In #5c0000 the red part is the hex number 5c. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) blue (c) yellow (d) red
  10. 10.🌈 In #004600 the green part is the hex number 46. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) magenta (c) yellow (d) black
  12. 12.🌈 In #000044 the blue part is the hex number 44. What is it as a normal number?
  13. 13.🌈 In #00006c the blue part is the hex number 6c. What is it as a normal number?
  14. 14.🌈 Which colour is #00ff00? (a) cyan (b) red (c) bright green (d) magenta
  15. 15.🌈 Which colour is #ffffff? (a) magenta (b) blue (c) black (d) white
  16. 16.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
  17. 17.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
  18. 18.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
  19. 19.🌈 Which hex code is yellow? (a) #ffffff (b) #0000ff (c) #00ffff (d) #ffff00
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  21. 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  22. 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  23. 23.🌈 Which colour is #00ffff? (a) magenta (b) yellow (c) white (d) cyan
  24. 24.🌈 Which colour of light is strongest in rgb(179, 12, 78)? (a) red (b) green (c) blue
  25. 25.🌈 Which hex code is blue? (a) #00ff00 (b) #ffff00 (c) #000000 (d) #0000ff
  26. 26.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) magenta (d) white
  27. 27.🌈 Which hex code is magenta? (a) #00ffff (b) #00ff00 (c) #ff00ff (d) #ff0000
  28. 28.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) cyan (d) bright green
  29. 29.🌈 Which colour of light is strongest in rgb(24, 59, 235)? (a) red (b) blue (c) green
  30. 30.🌈 Which colour of light is strongest in rgb(229, 17, 92)? (a) red (b) green (c) blue
  31. 31.🌈 In #600000 the red part is the hex number 60. What is it as a normal number?
  32. 32.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?
  33. 33.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
  34. 34.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) red (d) cyan
  35. 35.🌈 Which colour of light is strongest in rgb(110, 252, 22)? (a) green (b) blue (c) red
  36. 36.🌈 Which colour of light is strongest in rgb(6, 70, 227)? (a) green (b) blue (c) red
  37. 37.🌈 Which colour is #000000? (a) black (b) cyan (c) white (d) yellow
  38. 38.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  39. 39.🌈 Which colour of light is strongest in rgb(180, 16, 63)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(60, 209, 51)? (a) green (b) blue (c) red

Answer key

  1. magenta
  2. #000000
  3. #ffffff
  4. red
  5. bright green
  6. blue
  7. red
  8. 92
  9. yellow
  10. 70
  11. black
  12. 68
  13. 108
  14. bright green
  15. white
  16. 40
  17. 240
  18. 218
  19. #ffff00
  20. red
  21. 255
  22. 3
  23. cyan
  24. red
  25. #0000ff
  26. red
  27. #ff00ff
  28. white
  29. blue
  30. red
  31. 96
  32. 151
  33. 62
  34. blue
  35. green
  36. blue
  37. black
  38. F
  39. red
  40. green

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