← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 122 · 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 #00ffff? (a) magenta (b) bright green (c) cyan (d) white
  2. 2.🌈 Which colour of light is strongest in rgb(248, 127, 51)? (a) blue (b) red (c) green
  3. 3.🌈 In #001f00 the green part is the hex number 1f. What is it as a normal number?
  4. 4.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) red (d) blue
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  6. 6.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
  7. 7.🌈 Which colour is #00ff00? (a) bright green (b) cyan (c) red (d) black
  8. 8.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #ffffff (d) #000000
  9. 9.🌈 In #00000d the blue part is the hex number 0d. What is it as a normal number?
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 4 (d) 3
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  12. 12.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) red (c) magenta (d) black
  13. 13.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
  14. 14.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #000000
  15. 15.🌈 In #0000d6 the blue part is the hex number d6. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(172, 1, 21)? (a) red (b) blue (c) green
  17. 17.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) bright green (c) yellow (d) blue
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  19. 19.🌈 Which colour is #ffff00? (a) cyan (b) black (c) yellow (d) blue
  20. 20.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) white (c) magenta (d) red
  21. 21.🌈 Which colour is #ff0000? (a) black (b) white (c) blue (d) red
  22. 22.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ffff00
  23. 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  24. 24.🌈 Which hex code is magenta? (a) #000000 (b) #00ffff (c) #ff0000 (d) #ff00ff
  25. 25.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) bright green (d) black
  27. 27.🌈 Which hex code is yellow? (a) #00ffff (b) #ff0000 (c) #000000 (d) #ffff00
  28. 28.🌈 Which colour is #0000ff? (a) yellow (b) red (c) cyan (d) blue
  29. 29.🌈 In #000044 the blue part is the hex number 44. What is it as a normal number?
  30. 30.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) magenta (d) cyan
  32. 32.🌈 Which colour of light is strongest in rgb(6, 235, 42)? (a) blue (b) red (c) green
  33. 33.🌈 Which colour of light is strongest in rgb(135, 184, 89)? (a) red (b) green (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(204, 129, 111)? (a) blue (b) red (c) green
  35. 35.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(150, 89, 52)? (a) red (b) green (c) blue
  37. 37.🌈 Which colour is #000000? (a) red (b) bright green (c) black (d) white
  38. 38.🌈 In #00009e the blue part is the hex number 9e. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(22, 47, 213)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(23, 218, 62)? (a) red (b) blue (c) green

Answer key

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

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