← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 296 · 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 colour is #ffff00? (a) black (b) magenta (c) red (d) yellow
  2. 2.🌈 Which hex code is yellow? (a) #00ffff (b) #ff00ff (c) #ff0000 (d) #ffff00
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) magenta (d) black
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  6. 6.🌈 Which hex code is blue? (a) #ffff00 (b) #000000 (c) #0000ff (d) #ff0000
  7. 7.🌈 In #00000d the blue part is the hex number 0d. What is it as a normal number?
  8. 8.🌈 Which hex code is cyan? (a) #ff00ff (b) #0000ff (c) #ff0000 (d) #00ffff
  9. 9.🌈 Which colour is #ff0000? (a) red (b) black (c) magenta (d) cyan
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
  11. 11.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) magenta (d) red
  12. 12.🌈 Which colour is #00ff00? (a) red (b) black (c) bright green (d) white
  13. 13.🌈 In #00006e the blue part is the hex number 6e. What is it as a normal number?
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  15. 15.🌈 In #006c00 the green part is the hex number 6c. What is it as a normal number?
  16. 16.🌈 In #5d0000 the red part is the hex number 5d. What is it as a normal number?
  17. 17.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #ffff00 (d) #00ff00
  18. 18.🌈 In #0000e2 the blue part is the hex number e2. What is it as a normal number?
  19. 19.🌈 In #2f0000 the red part is the hex number 2f. What is it as a normal number?
  20. 20.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  21. 21.🌈 In #0000fb the blue part is the hex number fb. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(226, 139, 32)? (a) green (b) red (c) blue
  23. 23.🌈 Which colour is #ffffff? (a) bright green (b) white (c) red (d) yellow
  24. 24.🌈 Which colour of light is strongest in rgb(80, 14, 251)? (a) red (b) blue (c) green
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) bright green (c) yellow (d) white
  26. 26.🌈 In #000074 the blue part is the hex number 74. What is it as a normal number?
  27. 27.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?
  28. 28.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(40, 165, 16)? (a) green (b) blue (c) red
  30. 30.🌈 In #000064 the blue part is the hex number 64. What is it as a normal number?
  31. 31.🌈 Which hex code is white? (a) #ff00ff (b) #ffffff (c) #000000 (d) #00ff00
  32. 32.🌈 Which colour is #000000? (a) red (b) blue (c) magenta (d) black
  33. 33.🌈 Which colour is #ff00ff? (a) blue (b) bright green (c) magenta (d) white
  34. 34.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) yellow (c) black (d) white
  35. 35.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
  36. 36.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) yellow (c) bright green (d) blue
  37. 37.🌈 Which hex code is magenta? (a) #00ffff (b) #000000 (c) #ff00ff (d) #00ff00
  38. 38.🌈 Which colour of light is strongest in rgb(133, 202, 63)? (a) red (b) blue (c) green
  39. 39.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) cyan (c) red (d) blue
  40. 40.🌈 Which colour of light is strongest in rgb(10, 228, 100)? (a) blue (b) red (c) green

Answer key

  1. yellow
  2. #ffff00
  3. red
  4. F
  5. 255
  6. #0000ff
  7. 13
  8. #00ffff
  9. red
  10. red
  11. yellow
  12. bright green
  13. 110
  14. 3
  15. 108
  16. 93
  17. #00ff00
  18. 226
  19. 47
  20. blue
  21. 251
  22. red
  23. white
  24. blue
  25. cyan
  26. 116
  27. 194
  28. 98
  29. green
  30. 100
  31. #ffffff
  32. black
  33. magenta
  34. black
  35. 208
  36. bright green
  37. #ff00ff
  38. green
  39. blue
  40. green

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