← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 56 · 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.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  2. 2.🌈 Which hex code is bright green? (a) #ff00ff (b) #0000ff (c) #000000 (d) #00ff00
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) magenta (c) black (d) yellow
  5. 5.🌈 Which colour is #00ffff? (a) black (b) cyan (c) white (d) blue
  6. 6.🌈 Which colour of light is strongest in rgb(168, 20, 134)? (a) green (b) red (c) blue
  7. 7.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) blue (c) white (d) bright green
  8. 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  9. 9.🌈 Which colour is #ff0000? (a) red (b) white (c) blue (d) magenta
  10. 10.🌈 In #003300 the green part is the hex number 33. What is it as a normal number?
  11. 11.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  12. 12.🌈 Which colour of light is strongest in rgb(99, 213, 12)? (a) red (b) blue (c) green
  13. 13.🌈 Which colour of light is strongest in rgb(172, 14, 109)? (a) red (b) blue (c) green
  14. 14.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
  15. 15.🌈 In #000080 the blue part is the hex number 80. What is it as a normal number?
  16. 16.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #00ff00 (d) #ffff00
  17. 17.🌈 In #570000 the red part is the hex number 57. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(135, 136, 200)? (a) green (b) red (c) blue
  19. 19.🌈 Which hex code is cyan? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #00ffff
  20. 20.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) white (c) black (d) blue
  21. 21.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(222, 21, 58)? (a) red (b) blue (c) green
  23. 23.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
  24. 24.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
  25. 25.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) blue (d) cyan
  26. 26.🌈 Which colour of light is strongest in rgb(125, 251, 1)? (a) green (b) red (c) blue
  27. 27.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
  28. 28.🌈 In #00bc00 the green part is the hex number bc. What is it as a normal number?
  29. 29.🌈 Which colour is #ffffff? (a) bright green (b) white (c) magenta (d) cyan
  30. 30.🌈 Which colour of light is strongest in rgb(105, 253, 10)? (a) blue (b) red (c) green
  31. 31.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) magenta (d) red
  32. 32.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
  33. 33.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #ffff00 (d) #00ffff
  34. 34.🌈 In #002000 the green part is the hex number 20. What is it as a normal number?
  35. 35.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
  36. 36.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) magenta (c) bright green (d) cyan
  37. 37.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) bright green (c) magenta (d) red
  38. 38.🌈 Which colour of light is strongest in rgb(5, 248, 16)? (a) red (b) green (c) blue
  39. 39.🌈 Which colour of light is strongest in rgb(49, 157, 121)? (a) red (b) green (c) blue
  40. 40.🌈 In #0000a7 the blue part is the hex number a7. What is it as a normal number?

Answer key

  1. blue
  2. #00ff00
  3. red
  4. yellow
  5. cyan
  6. red
  7. bright green
  8. 3
  9. red
  10. 51
  11. 255
  12. green
  13. red
  14. 64
  15. 128
  16. #ff00ff
  17. 87
  18. blue
  19. #00ffff
  20. black
  21. 33
  22. red
  23. 112
  24. 12
  25. blue
  26. green
  27. 80
  28. 188
  29. white
  30. green
  31. cyan
  32. 36
  33. #ff0000
  34. 32
  35. 180
  36. white
  37. magenta
  38. green
  39. green
  40. 167

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