← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 167 · 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 #810000 the red part is the hex number 81. What is it as a normal number?
  2. 2.🌈 Which colour is #ff0000? (a) yellow (b) cyan (c) bright green (d) red
  3. 3.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #000000
  4. 4.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #0000ff (d) #00ff00
  5. 5.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) cyan (d) magenta
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
  9. 9.🌈 Which colour of light is strongest in rgb(92, 157, 33)? (a) green (b) blue (c) red
  10. 10.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
  11. 11.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffffff (d) #00ff00
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  13. 13.🌈 In #00a200 the green part is the hex number a2. What is it as a normal number?
  14. 14.🌈 Which colour is #0000ff? (a) magenta (b) bright green (c) cyan (d) blue
  15. 15.🌈 Which colour is #ffff00? (a) red (b) bright green (c) magenta (d) yellow
  16. 16.🌈 Which colour of light is strongest in rgb(212, 37, 3)? (a) green (b) red (c) blue
  17. 17.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) black (c) yellow (d) red
  18. 18.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) magenta (d) bright green
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  20. 20.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) black (d) blue
  21. 21.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) blue (d) white
  22. 22.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ffffff
  23. 23.🌈 In #000034 the blue part is the hex number 34. What is it as a normal number?
  24. 24.🌈 In #000085 the blue part is the hex number 85. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(183, 82, 59)? (a) blue (b) green (c) red
  26. 26.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #00ff00 (d) #ff0000
  27. 27.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(96, 192, 83)? (a) green (b) red (c) blue
  29. 29.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) cyan (d) yellow
  30. 30.🌈 Which colour of light is strongest in rgb(202, 29, 107)? (a) blue (b) green (c) red
  31. 31.🌈 Which colour of light is strongest in rgb(134, 4, 160)? (a) red (b) green (c) blue
  32. 32.🌈 Which hex code is red? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ff0000
  33. 33.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) bright green (c) yellow (d) white
  34. 34.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) black (d) red
  35. 35.🌈 Which colour of light is strongest in rgb(59, 161, 65)? (a) green (b) blue (c) red
  36. 36.🌈 Which colour is #ffffff? (a) bright green (b) blue (c) red (d) white
  37. 37.🌈 In #b80000 the red part is the hex number b8. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(151, 83, 59)? (a) red (b) green (c) blue
  39. 39.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) yellow (d) white
  40. 40.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) red (d) magenta

Answer key

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

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