← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 29 · 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 first two digits give? (a) black (b) red (c) blue (d) green
  2. 2.🌈 Which colour of light is strongest in rgb(12, 224, 59)? (a) green (b) red (c) blue
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  4. 4.🌈 Which colour is #00ff00? (a) black (b) red (c) bright green (d) yellow
  5. 5.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) yellow (c) bright green (d) red
  6. 6.🌈 Which hex code is black? (a) #ff0000 (b) #00ff00 (c) #00ffff (d) #000000
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  8. 8.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) yellow (d) cyan
  9. 9.🌈 Which colour is #000000? (a) black (b) blue (c) cyan (d) yellow
  10. 10.🌈 Which colour of light is strongest in rgb(139, 231, 64)? (a) blue (b) green (c) red
  11. 11.🌈 Which hex code is bright green? (a) #ff00ff (b) #00ffff (c) #000000 (d) #00ff00
  12. 12.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) white (c) cyan (d) blue
  13. 13.🌈 Which hex code is blue? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #0000ff
  14. 14.🌈 Which hex code is red? (a) #ff00ff (b) #0000ff (c) #ff0000 (d) #ffffff
  15. 15.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) cyan (d) red
  16. 16.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffffff (c) #ffff00 (d) #000000
  17. 17.🌈 Which colour of light is strongest in rgb(129, 126, 160)? (a) red (b) green (c) blue
  18. 18.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) bright green (c) blue (d) black
  20. 20.🌈 Which colour is #ff0000? (a) red (b) white (c) black (d) bright green
  21. 21.🌈 In #a80000 the red part is the hex number a8. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(80, 6, 200)? (a) blue (b) green (c) red
  23. 23.🌈 Which colour is #ff00ff? (a) bright green (b) cyan (c) white (d) magenta
  24. 24.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) blue (d) cyan
  26. 26.🌈 Which colour of light is strongest in rgb(253, 99, 62)? (a) green (b) blue (c) red
  27. 27.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #ffff00
  28. 28.🌈 In #0000d3 the blue part is the hex number d3. What is it as a normal number?
  29. 29.🌈 In #de0000 the red part is the hex number de. What is it as a normal number?
  30. 30.🌈 Which colour is #0000ff? (a) magenta (b) bright green (c) blue (d) red
  31. 31.🌈 Which colour of light is strongest in rgb(224, 38, 12)? (a) red (b) green (c) blue
  32. 32.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  33. 33.🌈 In #c10000 the red part is the hex number c1. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(47, 177, 8)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(245, 5, 20)? (a) blue (b) green (c) red
  36. 36.🌈 Which colour is #00ffff? (a) cyan (b) white (c) bright green (d) black
  37. 37.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(97, 216, 35)? (a) red (b) blue (c) green
  39. 39.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  40. 40.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?

Answer key

  1. red
  2. green
  3. F
  4. bright green
  5. white
  6. #000000
  7. 255
  8. red
  9. black
  10. green
  11. #00ff00
  12. cyan
  13. #0000ff
  14. #ff0000
  15. magenta
  16. #ffff00
  17. blue
  18. 188
  19. black
  20. red
  21. 168
  22. blue
  23. magenta
  24. 38
  25. blue
  26. red
  27. #00ffff
  28. 211
  29. 222
  30. blue
  31. red
  32. 3
  33. 193
  34. green
  35. red
  36. cyan
  37. 58
  38. green
  39. blue
  40. 246

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