← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 32 · 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) white (b) green (c) blue (d) red
  2. 2.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
  3. 3.🌈 Which colour is #00ffff? (a) black (b) cyan (c) yellow (d) magenta
  4. 4.🌈 Which hex code is blue? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #ffff00
  5. 5.🌈 Which colour is #ffff00? (a) yellow (b) red (c) blue (d) magenta
  6. 6.🌈 Which colour is #ffffff? (a) white (b) blue (c) red (d) cyan
  7. 7.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) white (d) yellow
  8. 8.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) black (d) cyan
  9. 9.🌈 In #00bb00 the green part is the hex number bb. What is it as a normal number?
  10. 10.🌈 In #00fb00 the green part is the hex number fb. What is it as a normal number?
  11. 11.🌈 In #003600 the green part is the hex number 36. What is it as a normal number?
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  14. 14.🌈 In #000085 the blue part is the hex number 85. What is it as a normal number?
  15. 15.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) magenta (d) bright green
  16. 16.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) black (c) bright green (d) cyan
  17. 17.🌈 In #b10000 the red part is the hex number b1. What is it as a normal number?
  18. 18.🌈 Which colour is #000000? (a) red (b) blue (c) black (d) white
  19. 19.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) red (c) black (d) magenta
  20. 20.🌈 Which hex code is red? (a) #0000ff (b) #000000 (c) #ff0000 (d) #ff00ff
  21. 21.🌈 In #00001d the blue part is the hex number 1d. What is it as a normal number?
  22. 22.🌈 Which hex code is bright green? (a) #ff0000 (b) #000000 (c) #00ffff (d) #00ff00
  23. 23.🌈 Which hex code is yellow? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #ffff00
  24. 24.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #000000 (d) #ff0000
  25. 25.🌈 Which colour of light is strongest in rgb(205, 39, 36)? (a) red (b) green (c) blue
  26. 26.🌈 Which colour of light is strongest in rgb(175, 92, 25)? (a) red (b) blue (c) green
  27. 27.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) red (d) yellow
  28. 28.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  29. 29.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) white (c) yellow (d) blue
  30. 30.🌈 In #0000fe the blue part is the hex number fe. What is it as a normal number?
  31. 31.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) cyan (d) white
  32. 32.🌈 Which colour of light is strongest in rgb(103, 23, 193)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour is #00ff00? (a) white (b) blue (c) bright green (d) red
  34. 34.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
  35. 35.🌈 Which hex code is magenta? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ff00ff
  36. 36.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) black (d) bright green
  38. 38.🌈 Which colour of light is strongest in rgb(234, 23, 51)? (a) green (b) red (c) blue
  39. 39.🌈 Which colour is #ff0000? (a) white (b) blue (c) red (d) bright green
  40. 40.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255

Answer key

  1. blue
  2. 33
  3. cyan
  4. #0000ff
  5. yellow
  6. white
  7. blue
  8. red
  9. 187
  10. 251
  11. 54
  12. red
  13. F
  14. 133
  15. blue
  16. bright green
  17. 177
  18. black
  19. magenta
  20. #ff0000
  21. 29
  22. #00ff00
  23. #ffff00
  24. #00ffff
  25. red
  26. red
  27. white
  28. 3
  29. yellow
  30. 254
  31. magenta
  32. blue
  33. bright green
  34. 32
  35. #ff00ff
  36. 64
  37. black
  38. red
  39. red
  40. 255

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