← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 110 · 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 rgb(255, 255, 0)? (a) red (b) bright green (c) yellow (d) magenta
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  3. 3.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) blue (c) white (d) magenta
  4. 4.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #ffffff (d) #ffff00
  5. 5.🌈 Which colour is #ff00ff? (a) yellow (b) white (c) magenta (d) bright green
  6. 6.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
  7. 7.🌈 Which colour is #00ff00? (a) cyan (b) white (c) bright green (d) black
  8. 8.🌈 In #030000 the red part is the hex number 03. What is it as a normal number?
  9. 9.🌈 Which colour is #0000ff? (a) red (b) bright green (c) cyan (d) blue
  10. 10.🌈 In #001900 the green part is the hex number 19. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) yellow (c) black (d) red
  12. 12.🌈 Which colour of light is strongest in rgb(153, 5, 39)? (a) blue (b) green (c) red
  13. 13.🌈 Which hex code is bright green? (a) #00ffff (b) #ff0000 (c) #000000 (d) #00ff00
  14. 14.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #000000
  15. 15.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #00ff00 (d) #ff00ff
  16. 16.🌈 Which colour of light is strongest in rgb(44, 204, 83)? (a) green (b) red (c) blue
  17. 17.🌈 Which colour is #ffff00? (a) blue (b) white (c) bright green (d) yellow
  18. 18.🌈 Which colour of light is strongest in rgb(245, 119, 27)? (a) red (b) green (c) blue
  19. 19.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) bright green (c) cyan (d) red
  20. 20.🌈 Which colour is #ff0000? (a) magenta (b) red (c) blue (d) yellow
  21. 21.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) bright green (d) white
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  23. 23.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) cyan (c) red (d) blue
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) yellow (d) red
  25. 25.🌈 Which colour of light is strongest in rgb(54, 225, 87)? (a) blue (b) red (c) green
  26. 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
  28. 28.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  29. 29.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
  30. 30.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) cyan (c) bright green (d) black
  32. 32.🌈 Which colour of light is strongest in rgb(63, 178, 128)? (a) red (b) blue (c) green
  33. 33.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
  34. 34.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #ff00ff
  35. 35.🌈 In #00ff00 the green part is the hex number ff. What is it as a normal number?
  36. 36.🌈 Which colour is #000000? (a) blue (b) white (c) black (d) bright green
  37. 37.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
  38. 38.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ffff00
  39. 39.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #0000ff
  40. 40.🌈 In #009700 the green part is the hex number 97. What is it as a normal number?

Answer key

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

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