← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 11 · 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.🌈 Which hex code is yellow? (a) #000000 (b) #ff00ff (c) #00ff00 (d) #ffff00
  2. 2.🌈 In #f40000 the red part is the hex number f4. What is it as a normal number?
  3. 3.🌈 In #00fd00 the green part is the hex number fd. What is it as a normal number?
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  5. 5.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  7. 7.🌈 Which hex code is red? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #ff0000
  8. 8.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) cyan (c) yellow (d) white
  9. 9.🌈 Which colour of light is strongest in rgb(244, 61, 46)? (a) green (b) blue (c) red
  10. 10.🌈 Which hex code is blue? (a) #ff0000 (b) #ffff00 (c) #000000 (d) #0000ff
  11. 11.🌈 Which colour is #ffffff? (a) cyan (b) white (c) black (d) yellow
  12. 12.🌈 Which colour is #00ff00? (a) red (b) blue (c) bright green (d) cyan
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  14. 14.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
  15. 15.🌈 In #000027 the blue part is the hex number 27. What is it as a normal number?
  16. 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  17. 17.🌈 Which colour of light is strongest in rgb(250, 80, 26)? (a) blue (b) green (c) red
  18. 18.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  19. 19.🌈 Which colour is #00ffff? (a) white (b) red (c) cyan (d) bright green
  20. 20.🌈 Which colour is #ff0000? (a) black (b) magenta (c) white (d) red
  21. 21.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) bright green (c) magenta (d) red
  22. 22.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) red (c) bright green (d) white
  23. 23.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) black (c) red (d) bright green
  24. 24.🌈 Which colour is #ff00ff? (a) red (b) white (c) bright green (d) magenta
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) black (c) yellow (d) cyan
  26. 26.🌈 Which colour is #ffff00? (a) yellow (b) black (c) blue (d) magenta
  27. 27.🌈 Which hex code is bright green? (a) #ffff00 (b) #0000ff (c) #00ff00 (d) #ffffff
  28. 28.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) black (c) blue (d) magenta
  29. 29.🌈 Which colour is #0000ff? (a) blue (b) black (c) yellow (d) magenta
  30. 30.🌈 In #d10000 the red part is the hex number d1. What is it as a normal number?
  31. 31.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  32. 32.🌈 Which colour is #000000? (a) bright green (b) black (c) blue (d) yellow
  33. 33.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) blue (d) magenta
  34. 34.🌈 In #0000d0 the blue part is the hex number d0. What is it as a normal number?
  35. 35.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
  36. 36.🌈 In #000036 the blue part is the hex number 36. What is it as a normal number?
  37. 37.🌈 In #130000 the red part is the hex number 13. What is it as a normal number?
  38. 38.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #000000
  39. 39.🌈 In #00c500 the green part is the hex number c5. What is it as a normal number?
  40. 40.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?

Answer key

  1. #ffff00
  2. 244
  3. 253
  4. red
  5. 77
  6. blue
  7. #ff0000
  8. yellow
  9. red
  10. #0000ff
  11. white
  12. bright green
  13. 3
  14. 141
  15. 39
  16. F
  17. red
  18. 242
  19. cyan
  20. red
  21. red
  22. white
  23. bright green
  24. magenta
  25. cyan
  26. yellow
  27. #00ff00
  28. blue
  29. blue
  30. 209
  31. 255
  32. black
  33. magenta
  34. 208
  35. 241
  36. 54
  37. 19
  38. #00ffff
  39. 197
  40. 65

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