← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 54 · 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.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  5. 5.🌈 Which colour is #ff0000? (a) black (b) white (c) red (d) yellow
  6. 6.🌈 Which colour is #ffffff? (a) black (b) yellow (c) cyan (d) white
  7. 7.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
  8. 8.🌈 Which colour is #00ff00? (a) cyan (b) white (c) black (d) bright green
  9. 9.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) yellow (d) magenta
  10. 10.🌈 In #000053 the blue part is the hex number 53. What is it as a normal number?
  11. 11.🌈 In #440000 the red part is the hex number 44. What is it as a normal number?
  12. 12.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #0000ff (d) #ffffff
  13. 13.🌈 Which colour of light is strongest in rgb(220, 21, 60)? (a) green (b) red (c) blue
  14. 14.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) yellow (d) black
  15. 15.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) magenta (c) red (d) black
  16. 16.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) yellow (d) red
  17. 17.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) magenta (d) blue
  18. 18.🌈 Which colour is #ffff00? (a) blue (b) red (c) yellow (d) black
  19. 19.🌈 Which colour of light is strongest in rgb(154, 123, 137)? (a) green (b) blue (c) red
  20. 20.🌈 Which colour of light is strongest in rgb(5, 8, 229)? (a) blue (b) green (c) red
  21. 21.🌈 Which colour of light is strongest in rgb(187, 140, 33)? (a) blue (b) red (c) green
  22. 22.🌈 In #000048 the blue part is the hex number 48. What is it as a normal number?
  23. 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  24. 24.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
  25. 25.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #ffff00 (d) #00ffff
  26. 26.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) white (d) bright green
  28. 28.🌈 Which colour of light is strongest in rgb(181, 39, 53)? (a) red (b) green (c) blue
  29. 29.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) blue (d) black
  30. 30.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  31. 31.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
  32. 32.🌈 In #770000 the red part is the hex number 77. What is it as a normal number?
  33. 33.🌈 Which colour is #000000? (a) white (b) cyan (c) magenta (d) black
  34. 34.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) white (c) blue (d) red
  35. 35.🌈 Which colour of light is strongest in rgb(80, 232, 112)? (a) green (b) blue (c) red
  36. 36.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #000000
  37. 37.🌈 In #005b00 the green part is the hex number 5b. What is it as a normal number?
  38. 38.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #ff00ff
  39. 39.🌈 Which colour of light is strongest in rgb(233, 121, 87)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(121, 108, 159)? (a) red (b) blue (c) green

Answer key

  1. 241
  2. 3
  3. 255
  4. red
  5. red
  6. white
  7. 17
  8. bright green
  9. blue
  10. 83
  11. 68
  12. #ffffff
  13. red
  14. magenta
  15. black
  16. magenta
  17. blue
  18. yellow
  19. red
  20. blue
  21. red
  22. 72
  23. F
  24. 19
  25. #ff00ff
  26. 164
  27. cyan
  28. red
  29. cyan
  30. blue
  31. 172
  32. 119
  33. black
  34. yellow
  35. green
  36. #00ffff
  37. 91
  38. #ffff00
  39. red
  40. blue

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