← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 86 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  2. 2.🌈 Which colour of light is strongest in rgb(126, 219, 89)? (a) blue (b) green (c) red
  3. 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  4. 4.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ff00 (d) #00ffff
  5. 5.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
  6. 6.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) bright green (c) yellow (d) red
  7. 7.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  9. 9.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) yellow (d) magenta
  11. 11.🌈 Which colour of light is strongest in rgb(54, 252, 45)? (a) red (b) blue (c) green
  12. 12.🌈 Which hex code is white? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #ffffff
  13. 13.🌈 Which colour is #ffff00? (a) red (b) cyan (c) yellow (d) white
  14. 14.🌈 In #c30000 the red part is the hex number c3. What is it as a normal number?
  15. 15.🌈 Which colour is #00ffff? (a) cyan (b) red (c) black (d) blue
  16. 16.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) red (d) white
  17. 17.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  18. 18.🌈 Which hex code is magenta? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ff0000
  19. 19.🌈 In #780000 the red part is the hex number 78. What is it as a normal number?
  20. 20.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(65, 184, 20)? (a) green (b) red (c) blue
  22. 22.🌈 In #00b600 the green part is the hex number b6. What is it as a normal number?
  23. 23.🌈 In #000052 the blue part is the hex number 52. What is it as a normal number?
  24. 24.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  25. 25.🌈 Which hex code is black? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ff0000
  26. 26.🌈 Which colour of light is strongest in rgb(20, 115, 231)? (a) green (b) blue (c) red
  27. 27.🌈 Which colour is #ff0000? (a) white (b) cyan (c) red (d) magenta
  28. 28.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #000000 (d) #ffffff
  29. 29.🌈 In #000035 the blue part is the hex number 35. What is it as a normal number?
  30. 30.🌈 Which colour is #ffffff? (a) yellow (b) white (c) red (d) cyan
  31. 31.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) black (d) magenta
  32. 32.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) magenta (c) bright green (d) black
  33. 33.🌈 Which colour of light is strongest in rgb(248, 60, 72)? (a) red (b) green (c) blue
  34. 34.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(229, 21, 17)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(205, 59, 126)? (a) green (b) blue (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(102, 85, 249)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour is #ff00ff? (a) black (b) blue (c) bright green (d) magenta
  39. 39.🌈 Which colour of light is strongest in rgb(33, 5, 168)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) yellow (d) bright green

Answer key

  1. F
  2. green
  3. 3
  4. #00ffff
  5. 146
  6. yellow
  7. 58
  8. red
  9. 77
  10. black
  11. green
  12. #ffffff
  13. yellow
  14. 195
  15. cyan
  16. blue
  17. blue
  18. #ff00ff
  19. 120
  20. 211
  21. green
  22. 182
  23. 82
  24. 255
  25. #000000
  26. blue
  27. red
  28. #0000ff
  29. 53
  30. white
  31. cyan
  32. bright green
  33. red
  34. 112
  35. red
  36. red
  37. blue
  38. magenta
  39. blue
  40. red

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