← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 261 · 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 hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #ffff00
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  3. 3.🌈 Which colour is #ff0000? (a) red (b) blue (c) yellow (d) magenta
  4. 4.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) black (d) white
  5. 5.🌈 In #ad0000 the red part is the hex number ad. What is it as a normal number?
  6. 6.🌈 Which hex code is red? (a) #ffffff (b) #00ff00 (c) #ff0000 (d) #0000ff
  7. 7.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) cyan (d) magenta
  8. 8.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  9. 9.🌈 Which colour of light is strongest in rgb(122, 22, 183)? (a) green (b) blue (c) red
  10. 10.🌈 Which colour of light is strongest in rgb(95, 166, 130)? (a) blue (b) red (c) green
  11. 11.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) bright green (d) cyan
  12. 12.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) white (c) blue (d) black
  13. 13.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) red (d) cyan
  14. 14.🌈 Which colour of light is strongest in rgb(1, 206, 106)? (a) red (b) blue (c) green
  15. 15.🌈 Which hex code is cyan? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ff00ff
  16. 16.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #00ffff
  17. 17.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) red (c) black (d) blue
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  19. 19.🌈 Which colour is #0000ff? (a) black (b) blue (c) yellow (d) magenta
  20. 20.🌈 In #00cb00 the green part is the hex number cb. What is it as a normal number?
  21. 21.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
  22. 22.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) yellow (d) magenta
  23. 23.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) bright green (c) magenta (d) white
  24. 24.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  25. 25.🌈 Which colour is #00ffff? (a) white (b) bright green (c) magenta (d) cyan
  26. 26.🌈 Which colour of light is strongest in rgb(68, 43, 206)? (a) blue (b) green (c) red
  27. 27.🌈 In #7d0000 the red part is the hex number 7d. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) magenta (c) bright green (d) red
  29. 29.🌈 Which colour of light is strongest in rgb(240, 56, 82)? (a) green (b) red (c) blue
  30. 30.🌈 Which colour is #000000? (a) cyan (b) black (c) blue (d) magenta
  31. 31.🌈 Which colour of light is strongest in rgb(218, 103, 23)? (a) green (b) red (c) blue
  32. 32.🌈 In #006d00 the green part is the hex number 6d. What is it as a normal number?
  33. 33.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) black (d) bright green
  34. 34.🌈 Which colour of light is strongest in rgb(59, 137, 151)? (a) red (b) green (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(232, 23, 131)? (a) red (b) blue (c) green
  36. 36.🌈 Which colour of light is strongest in rgb(54, 119, 200)? (a) red (b) green (c) blue
  37. 37.🌈 In #00c900 the green part is the hex number c9. What is it as a normal number?
  38. 38.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(53, 119, 214)? (a) green (b) red (c) blue
  40. 40.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green

Answer key

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

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