← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 360 · 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 #ff00ff? (a) blue (b) cyan (c) magenta (d) bright green
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) white (c) red (d) cyan
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) white (d) magenta
  5. 5.🌈 Which colour is #ffffff? (a) red (b) white (c) magenta (d) yellow
  6. 6.🌈 Which colour is #00ff00? (a) yellow (b) blue (c) white (d) bright green
  7. 7.🌈 Which colour of light is strongest in rgb(79, 154, 63)? (a) blue (b) red (c) green
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  9. 9.🌈 Which colour is #ff0000? (a) black (b) blue (c) red (d) white
  10. 10.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
  11. 11.🌈 Which hex code is white? (a) #00ffff (b) #00ff00 (c) #ff00ff (d) #ffffff
  12. 12.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) bright green (c) blue (d) cyan
  13. 13.🌈 Which colour is #000000? (a) cyan (b) blue (c) magenta (d) black
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  15. 15.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  17. 17.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
  18. 18.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #ffffff (d) #ff0000
  19. 19.🌈 In #00e700 the green part is the hex number e7. What is it as a normal number?
  20. 20.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #ffffff (d) #000000
  21. 21.🌈 Which colour is #00ffff? (a) cyan (b) red (c) magenta (d) yellow
  22. 22.🌈 In #00005b the blue part is the hex number 5b. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) white (c) yellow (d) red
  24. 24.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #00ff00
  25. 25.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) red (c) magenta (d) bright green
  26. 26.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) blue (d) black
  28. 28.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) blue (c) white (d) cyan
  29. 29.🌈 Which colour of light is strongest in rgb(126, 115, 211)? (a) blue (b) green (c) red
  30. 30.🌈 Which colour of light is strongest in rgb(178, 68, 25)? (a) green (b) blue (c) red
  31. 31.🌈 Which hex code is bright green? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #00ff00
  32. 32.🌈 Which colour of light is strongest in rgb(45, 17, 219)? (a) green (b) red (c) blue
  33. 33.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #ffffff (d) #ffff00
  34. 34.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(84, 223, 50)? (a) red (b) blue (c) green
  36. 36.🌈 Which colour of light is strongest in rgb(207, 115, 63)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour is #ffff00? (a) red (b) magenta (c) yellow (d) blue
  38. 38.🌈 Which colour of light is strongest in rgb(79, 218, 90)? (a) red (b) green (c) blue
  39. 39.🌈 Which colour is #0000ff? (a) black (b) blue (c) white (d) bright green
  40. 40.🌈 In #2b0000 the red part is the hex number 2b. What is it as a normal number?

Answer key

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

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