← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 173 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  2. 2.🌈 Which colour is #00ff00? (a) magenta (b) bright green (c) yellow (d) blue
  3. 3.🌈 Which colour of light is strongest in rgb(61, 98, 172)? (a) green (b) blue (c) red
  4. 4.🌈 Which hex code is magenta? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #ff00ff
  5. 5.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) red
  6. 6.🌈 Which colour of light is strongest in rgb(106, 82, 156)? (a) green (b) red (c) blue
  7. 7.🌈 In #00001e the blue part is the hex number 1e. What is it as a normal number?
  8. 8.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
  9. 9.🌈 Which hex code is white? (a) #00ffff (b) #ff00ff (c) #ffffff (d) #00ff00
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  11. 11.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #00ff00
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  13. 13.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
  14. 14.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) black (d) white
  15. 15.🌈 Which colour is #0000ff? (a) white (b) yellow (c) cyan (d) blue
  16. 16.🌈 In #0000c0 the blue part is the hex number c0. What is it as a normal number?
  17. 17.🌈 In #240000 the red part is the hex number 24. What is it as a normal number?
  18. 18.🌈 Which colour is #ff0000? (a) red (b) yellow (c) bright green (d) white
  19. 19.🌈 Which colour is #ffffff? (a) bright green (b) red (c) white (d) black
  20. 20.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) red (d) blue
  21. 21.🌈 In #00002d the blue part is the hex number 2d. What is it as a normal number?
  22. 22.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
  23. 23.🌈 Which colour of light is strongest in rgb(223, 85, 25)? (a) green (b) red (c) blue
  24. 24.🌈 In #003700 the green part is the hex number 37. What is it as a normal number?
  25. 25.🌈 Which colour is #00ffff? (a) cyan (b) white (c) magenta (d) red
  26. 26.🌈 Which colour is #ffff00? (a) white (b) magenta (c) yellow (d) black
  27. 27.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) bright green (d) black
  28. 28.🌈 In #660000 the red part is the hex number 66. What is it as a normal number?
  29. 29.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) red (c) white (d) black
  30. 30.🌈 Which colour of light is strongest in rgb(174, 71, 35)? (a) green (b) red (c) blue
  31. 31.🌈 In #f40000 the red part is the hex number f4. What is it as a normal number?
  32. 32.🌈 In #003000 the green part is the hex number 30. What is it as a normal number?
  33. 33.🌈 Which hex code is black? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #000000
  34. 34.🌈 Which colour of light is strongest in rgb(191, 67, 18)? (a) blue (b) green (c) red
  35. 35.🌈 Which colour of light is strongest in rgb(50, 179, 121)? (a) blue (b) red (c) green
  36. 36.🌈 Which colour of light is strongest in rgb(180, 81, 12)? (a) green (b) blue (c) red
  37. 37.🌈 Which hex code is yellow? (a) #0000ff (b) #ff00ff (c) #ffff00 (d) #ff0000
  38. 38.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) cyan (d) black
  39. 39.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) magenta (c) black (d) white

Answer key

  1. 3
  2. bright green
  3. blue
  4. #ff00ff
  5. yellow
  6. blue
  7. 30
  8. 41
  9. #ffffff
  10. blue
  11. #ff0000
  12. 255
  13. 12
  14. magenta
  15. blue
  16. 192
  17. 36
  18. red
  19. white
  20. bright green
  21. 45
  22. red
  23. red
  24. 55
  25. cyan
  26. yellow
  27. cyan
  28. 102
  29. red
  30. red
  31. 244
  32. 48
  33. #000000
  34. red
  35. green
  36. red
  37. #ffff00
  38. black
  39. 190
  40. white

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