← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 21 · 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 rgb(255, 255, 0)? (a) yellow (b) blue (c) cyan (d) magenta
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  4. 4.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #000000
  5. 5.🌈 Which colour is #000000? (a) red (b) black (c) yellow (d) white
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
  7. 7.🌈 Which colour is #00ffff? (a) magenta (b) black (c) red (d) cyan
  8. 8.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  9. 9.🌈 Which colour of light is strongest in rgb(94, 63, 217)? (a) green (b) blue (c) red
  10. 10.🌈 Which colour of light is strongest in rgb(139, 181, 52)? (a) green (b) blue (c) red
  11. 11.🌈 Which hex code is red? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ff0000
  12. 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  13. 13.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
  14. 14.🌈 Which hex code is magenta? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #ffffff
  15. 15.🌈 Which hex code is black? (a) #00ff00 (b) #000000 (c) #0000ff (d) #00ffff
  16. 16.🌈 In #110000 the red part is the hex number 11. What is it as a normal number?
  17. 17.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
  18. 18.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #ff00ff (d) #00ffff
  19. 19.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  20. 20.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) bright green (c) blue (d) black
  21. 21.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) magenta (c) blue (d) red
  22. 22.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) white (c) black (d) bright green
  23. 23.🌈 Which colour of light is strongest in rgb(194, 138, 115)? (a) blue (b) green (c) red
  24. 24.🌈 Which colour is #ff0000? (a) blue (b) black (c) red (d) cyan
  25. 25.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #ff0000
  26. 26.🌈 Which colour is #ffffff? (a) magenta (b) white (c) blue (d) bright green
  27. 27.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) white (d) red
  28. 28.🌈 Which colour is #00ff00? (a) black (b) bright green (c) magenta (d) blue
  29. 29.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #ffffff (d) #ff0000
  30. 30.🌈 Which colour of light is strongest in rgb(160, 99, 28)? (a) blue (b) red (c) green
  31. 31.🌈 Which colour of light is strongest in rgb(84, 217, 56)? (a) red (b) green (c) blue
  32. 32.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) white (d) yellow
  33. 33.🌈 Which colour of light is strongest in rgb(123, 226, 132)? (a) red (b) blue (c) green
  34. 34.🌈 Which colour of light is strongest in rgb(96, 178, 61)? (a) red (b) green (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(252, 87, 118)? (a) blue (b) red (c) green
  36. 36.🌈 Which colour is #ff00ff? (a) black (b) white (c) magenta (d) bright green
  37. 37.🌈 Which colour is #0000ff? (a) blue (b) magenta (c) cyan (d) yellow
  38. 38.🌈 In #000016 the blue part is the hex number 16. What is it as a normal number?
  39. 39.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
  40. 40.🌈 In #0000b4 the blue part is the hex number b4. What is it as a normal number?

Answer key

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

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