← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 236 · 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 #006100 the green part is the hex number 61. What is it as a normal number?
  2. 2.🌈 Which hex code is blue? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #00ff00
  3. 3.🌈 Which colour is #0000ff? (a) bright green (b) white (c) black (d) blue
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  5. 5.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) white (d) red
  6. 6.🌈 Which colour of light is strongest in rgb(65, 32, 211)? (a) green (b) red (c) blue
  7. 7.🌈 Which colour is #000000? (a) black (b) white (c) red (d) cyan
  8. 8.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) red (d) blue
  9. 9.🌈 Which hex code is black? (a) #00ffff (b) #00ff00 (c) #000000 (d) #ff0000
  10. 10.🌈 Which colour is #00ffff? (a) magenta (b) white (c) cyan (d) black
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  12. 12.🌈 Which hex code is white? (a) #00ffff (b) #000000 (c) #ffffff (d) #ffff00
  13. 13.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
  14. 14.🌈 Which hex code is magenta? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #ff00ff
  15. 15.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) black (c) cyan (d) blue
  16. 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  17. 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  18. 18.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) white (d) red
  19. 19.🌈 In #000006 the blue part is the hex number 06. What is it as a normal number?
  20. 20.🌈 Which colour of light is strongest in rgb(18, 162, 139)? (a) green (b) blue (c) red
  21. 21.🌈 In #0000fe the blue part is the hex number fe. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(237, 121, 80)? (a) red (b) green (c) blue
  23. 23.🌈 In #f00000 the red part is the hex number f0. What is it as a normal number?
  24. 24.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) white (c) blue (d) magenta
  25. 25.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
  26. 26.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  27. 27.🌈 Which colour of light is strongest in rgb(248, 97, 78)? (a) blue (b) red (c) green
  28. 28.🌈 Which hex code is red? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #00ff00
  29. 29.🌈 Which colour is #ff0000? (a) white (b) red (c) yellow (d) black
  30. 30.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) red (c) black (d) bright green
  31. 31.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) red (c) yellow (d) bright green
  32. 32.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) yellow (c) red (d) white
  33. 33.🌈 Which colour of light is strongest in rgb(90, 98, 162)? (a) red (b) green (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(13, 246, 51)? (a) red (b) green (c) blue
  35. 35.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
  36. 36.🌈 Which colour is #ffffff? (a) red (b) bright green (c) white (d) magenta
  37. 37.🌈 In #e10000 the red part is the hex number e1. What is it as a normal number?
  38. 38.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
  39. 39.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #0000ff
  40. 40.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) magenta (c) cyan (d) blue

Answer key

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

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