← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 340 · 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 #00ff00? (a) bright green (b) yellow (c) red (d) blue
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
  3. 3.🌈 In #00dc00 the green part is the hex number dc. What is it as a normal number?
  4. 4.🌈 Which colour is #ff0000? (a) yellow (b) white (c) cyan (d) red
  5. 5.🌈 Which colour of light is strongest in rgb(116, 154, 26)? (a) green (b) blue (c) red
  6. 6.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
  7. 7.🌈 Which colour of light is strongest in rgb(238, 115, 118)? (a) green (b) blue (c) red
  8. 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  9. 9.🌈 In #170000 the red part is the hex number 17. What is it as a normal number?
  10. 10.🌈 Which colour is #ffff00? (a) white (b) yellow (c) cyan (d) red
  11. 11.🌈 Which hex code is white? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #ffffff
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  14. 14.🌈 Which colour of light is strongest in rgb(178, 64, 27)? (a) red (b) blue (c) green
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  16. 16.🌈 Which colour of light is strongest in rgb(24, 238, 44)? (a) blue (b) green (c) red
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) yellow (d) white
  18. 18.🌈 In #0000db the blue part is the hex number db. What is it as a normal number?
  19. 19.🌈 In #0000dd the blue part is the hex number dd. What is it as a normal number?
  20. 20.🌈 In #002f00 the green part is the hex number 2f. What is it as a normal number?
  21. 21.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) red (d) yellow
  22. 22.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  23. 23.🌈 Which colour is #ff00ff? (a) yellow (b) black (c) magenta (d) bright green
  24. 24.🌈 Which colour of light is strongest in rgb(196, 27, 99)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour of light is strongest in rgb(62, 172, 106)? (a) blue (b) red (c) green
  26. 26.🌈 Which colour of light is strongest in rgb(23, 106, 151)? (a) blue (b) green (c) red
  27. 27.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) yellow (c) magenta (d) cyan
  28. 28.🌈 Which colour is #000000? (a) yellow (b) cyan (c) black (d) white
  29. 29.🌈 In #500000 the red part is the hex number 50. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(174, 77, 36)? (a) blue (b) green (c) red
  31. 31.🌈 Which colour of light is strongest in rgb(198, 70, 53)? (a) blue (b) green (c) red
  32. 32.🌈 In #00c600 the green part is the hex number c6. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) bright green (d) white
  34. 34.🌈 Which colour of light is strongest in rgb(218, 79, 7)? (a) green (b) red (c) blue
  35. 35.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff00ff (d) #00ffff
  36. 36.🌈 Which hex code is black? (a) #ff0000 (b) #0000ff (c) #00ffff (d) #000000
  37. 37.🌈 Which colour of light is strongest in rgb(216, 49, 5)? (a) blue (b) red (c) green
  38. 38.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
  39. 39.🌈 In #0000fc the blue part is the hex number fc. What is it as a normal number?
  40. 40.🌈 Which hex code is yellow? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #000000

Answer key

  1. bright green
  2. blue
  3. 220
  4. red
  5. green
  6. #ff0000
  7. red
  8. 3
  9. 23
  10. yellow
  11. #ffffff
  12. 255
  13. F
  14. red
  15. red
  16. green
  17. red
  18. 219
  19. 221
  20. 47
  21. blue
  22. 132
  23. magenta
  24. red
  25. green
  26. blue
  27. cyan
  28. black
  29. 80
  30. red
  31. red
  32. 198
  33. black
  34. red
  35. #0000ff
  36. #000000
  37. red
  38. 143
  39. 252
  40. #ffff00

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