← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 182 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  2. 2.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
  3. 3.🌈 Which colour is #ff00ff? (a) bright green (b) red (c) black (d) magenta
  4. 4.🌈 Which colour is #ffff00? (a) black (b) magenta (c) yellow (d) bright green
  5. 5.🌈 Which hex code is black? (a) #0000ff (b) #ffffff (c) #00ff00 (d) #000000
  6. 6.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  8. 8.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) red (d) white
  9. 9.🌈 Which colour of light is strongest in rgb(222, 89, 8)? (a) green (b) red (c) blue
  10. 10.🌈 Which colour of light is strongest in rgb(70, 35, 156)? (a) green (b) red (c) blue
  11. 11.🌈 Which colour is #00ffff? (a) cyan (b) black (c) yellow (d) bright green
  12. 12.🌈 Which hex code is red? (a) #00ffff (b) #ffff00 (c) #000000 (d) #ff0000
  13. 13.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  14. 14.🌈 Which hex code is white? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #ffffff
  15. 15.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) cyan (d) black
  16. 16.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ff0000
  17. 17.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) yellow (c) magenta (d) cyan
  18. 18.🌈 Which colour is #ffffff? (a) red (b) cyan (c) white (d) bright green
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) blue (d) bright green
  20. 20.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) white (c) black (d) red
  21. 21.🌈 Which hex code is blue? (a) #ff00ff (b) #00ffff (c) #00ff00 (d) #0000ff
  22. 22.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(122, 216, 58)? (a) blue (b) green (c) red
  24. 24.🌈 Which hex code is yellow? (a) #00ff00 (b) #000000 (c) #ffff00 (d) #00ffff
  25. 25.🌈 Which colour of light is strongest in rgb(198, 39, 104)? (a) green (b) blue (c) red
  26. 26.🌈 In #003000 the green part is the hex number 30. What is it as a normal number?
  27. 27.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  28. 28.🌈 Which colour is #0000ff? (a) blue (b) yellow (c) red (d) magenta
  29. 29.🌈 In #00002e the blue part is the hex number 2e. What is it as a normal number?
  30. 30.🌈 Which colour is #ff0000? (a) blue (b) red (c) black (d) magenta
  31. 31.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  32. 32.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) red (c) white (d) magenta
  33. 33.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
  34. 34.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(125, 96, 182)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour is #000000? (a) bright green (b) cyan (c) blue (d) black
  37. 37.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #ffff00
  38. 38.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) white (c) magenta (d) yellow
  39. 39.🌈 Which colour of light is strongest in rgb(173, 25, 5)? (a) green (b) red (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(127, 14, 235)? (a) green (b) red (c) blue

Answer key

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

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