← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 102 · 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 #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  2. 2.🌈 Which colour of light is strongest in rgb(27, 190, 75)? (a) green (b) red (c) blue
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) magenta (d) yellow
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  5. 5.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) black (d) white
  6. 6.🌈 Which colour of light is strongest in rgb(169, 103, 75)? (a) blue (b) green (c) red
  7. 7.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #ffffff (d) #00ffff
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  9. 9.🌈 Which colour of light is strongest in rgb(26, 187, 8)? (a) blue (b) red (c) green
  10. 10.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) blue (d) yellow
  11. 11.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) black (d) red
  12. 12.🌈 In #000096 the blue part is the hex number 96. What is it as a normal number?
  13. 13.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
  14. 14.🌈 Which colour is #000000? (a) cyan (b) black (c) bright green (d) magenta
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  16. 16.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) blue (d) red
  17. 17.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) blue (c) bright green (d) black
  18. 18.🌈 Which colour is #ff0000? (a) black (b) cyan (c) white (d) red
  19. 19.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
  20. 20.🌈 In #c80000 the red part is the hex number c8. What is it as a normal number?
  21. 21.🌈 Which hex code is white? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #ffffff
  22. 22.🌈 Which colour is #ff00ff? (a) black (b) cyan (c) magenta (d) white
  23. 23.🌈 Which colour of light is strongest in rgb(230, 81, 139)? (a) green (b) red (c) blue
  24. 24.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) red (d) yellow
  25. 25.🌈 Which colour of light is strongest in rgb(159, 23, 100)? (a) green (b) red (c) blue
  26. 26.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
  27. 27.🌈 In #0000fd the blue part is the hex number fd. What is it as a normal number?
  28. 28.🌈 Which colour is #ffffff? (a) red (b) cyan (c) white (d) magenta
  29. 29.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  30. 30.🌈 Which colour of light is strongest in rgb(16, 220, 46)? (a) blue (b) red (c) green
  31. 31.🌈 Which colour of light is strongest in rgb(81, 169, 11)? (a) blue (b) green (c) red
  32. 32.🌈 In #000045 the blue part is the hex number 45. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) white (d) red
  34. 34.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #ffff00 (d) #ffffff
  35. 35.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(224, 87, 35)? (a) green (b) blue (c) red
  37. 37.🌈 In #8b0000 the red part is the hex number 8b. What is it as a normal number?
  38. 38.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #00ffff
  39. 39.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) magenta (d) red
  40. 40.🌈 Which colour of light is strongest in rgb(21, 192, 18)? (a) red (b) green (c) blue

Answer key

  1. blue
  2. green
  3. red
  4. 3
  5. cyan
  6. red
  7. #00ffff
  8. F
  9. green
  10. black
  11. magenta
  12. 150
  13. 97
  14. black
  15. red
  16. blue
  17. blue
  18. red
  19. 217
  20. 200
  21. #ffffff
  22. magenta
  23. red
  24. cyan
  25. red
  26. 147
  27. 253
  28. white
  29. 255
  30. green
  31. green
  32. 69
  33. bright green
  34. #0000ff
  35. 84
  36. red
  37. 139
  38. #ff0000
  39. bright green
  40. green

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