← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 282 · 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 #990000 the red part is the hex number 99. What is it as a normal number?
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  3. 3.🌈 Which colour is #0000ff? (a) red (b) black (c) blue (d) bright green
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  5. 5.🌈 Which colour of light is strongest in rgb(18, 36, 165)? (a) green (b) red (c) blue
  6. 6.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #ff00ff (d) #000000
  7. 7.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) blue (c) black (d) red
  9. 9.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) magenta (d) blue
  10. 10.🌈 Which colour of light is strongest in rgb(125, 228, 95)? (a) blue (b) green (c) red
  11. 11.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) red (c) white (d) yellow
  12. 12.🌈 Which colour of light is strongest in rgb(122, 189, 39)? (a) red (b) green (c) blue
  13. 13.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  14. 14.🌈 In #00be00 the green part is the hex number be. What is it as a normal number?
  15. 15.🌈 Which colour is #ffff00? (a) bright green (b) white (c) yellow (d) cyan
  16. 16.🌈 Which colour of light is strongest in rgb(36, 80, 178)? (a) blue (b) green (c) red
  17. 17.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
  18. 18.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) yellow (d) black
  19. 19.🌈 Which colour is #000000? (a) magenta (b) blue (c) yellow (d) black
  20. 20.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  21. 21.🌈 Which colour is #ff00ff? (a) black (b) white (c) magenta (d) cyan
  22. 22.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffffff
  23. 23.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) white (d) cyan
  24. 24.🌈 In #001e00 the green part is the hex number 1e. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) bright green (d) cyan
  26. 26.🌈 Which hex code is cyan? (a) #ffffff (b) #00ffff (c) #ff0000 (d) #0000ff
  27. 27.🌈 Which hex code is blue? (a) #00ffff (b) #ffffff (c) #0000ff (d) #ffff00
  28. 28.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
  29. 29.🌈 In #5c0000 the red part is the hex number 5c. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(128, 222, 77)? (a) green (b) red (c) blue
  31. 31.🌈 In #310000 the red part is the hex number 31. What is it as a normal number?
  32. 32.🌈 Which colour is #ff0000? (a) red (b) bright green (c) blue (d) yellow
  33. 33.🌈 Which colour is #00ff00? (a) black (b) magenta (c) bright green (d) cyan
  34. 34.🌈 Which colour of light is strongest in rgb(5, 210, 24)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(246, 37, 116)? (a) blue (b) green (c) red
  36. 36.🌈 In #0000c0 the blue part is the hex number c0. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) white (d) yellow
  38. 38.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(208, 80, 89)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(72, 153, 121)? (a) green (b) red (c) blue

Answer key

  1. 153
  2. F
  3. blue
  4. 3
  5. blue
  6. #00ff00
  7. 71
  8. red
  9. cyan
  10. green
  11. yellow
  12. green
  13. 255
  14. 190
  15. yellow
  16. blue
  17. red
  18. cyan
  19. black
  20. blue
  21. magenta
  22. #ff0000
  23. blue
  24. 30
  25. white
  26. #00ffff
  27. #0000ff
  28. 195
  29. 92
  30. green
  31. 49
  32. red
  33. bright green
  34. green
  35. red
  36. 192
  37. black
  38. 38
  39. red
  40. green

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