← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 324 · 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 #ffffff? (a) cyan (b) bright green (c) white (d) magenta
  2. 2.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) cyan (d) red
  3. 3.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) white (d) magenta
  4. 4.🌈 Which colour is #0000ff? (a) bright green (b) white (c) blue (d) magenta
  5. 5.🌈 Which colour of light is strongest in rgb(98, 83, 234)? (a) green (b) red (c) blue
  6. 6.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #0000ff
  7. 7.🌈 Which hex code is red? (a) #ff00ff (b) #00ff00 (c) #ff0000 (d) #000000
  8. 8.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) cyan (d) black
  9. 9.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) black (d) white
  10. 10.🌈 In #00005f the blue part is the hex number 5f. What is it as a normal number?
  11. 11.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #0000ff (d) #ff0000
  12. 12.🌈 Which colour is #ffff00? (a) red (b) bright green (c) yellow (d) blue
  13. 13.🌈 In #00008f the blue part is the hex number 8f. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) yellow (c) bright green (d) black
  15. 15.🌈 In #00d100 the green part is the hex number d1. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(30, 28, 236)? (a) green (b) red (c) blue
  17. 17.🌈 Which colour of light is strongest in rgb(61, 231, 12)? (a) blue (b) red (c) green
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) black (d) white
  19. 19.🌈 Which hex code is black? (a) #ffff00 (b) #0000ff (c) #000000 (d) #00ff00
  20. 20.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
  21. 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  22. 22.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
  23. 23.🌈 In #7c0000 the red part is the hex number 7c. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(15, 31, 197)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour of light is strongest in rgb(31, 229, 25)? (a) blue (b) red (c) green
  26. 26.🌈 In #008d00 the green part is the hex number 8d. What is it as a normal number?
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  28. 28.🌈 In #000075 the blue part is the hex number 75. What is it as a normal number?
  29. 29.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) magenta (d) bright green
  30. 30.🌈 Which colour is #00ff00? (a) blue (b) yellow (c) bright green (d) magenta
  31. 31.🌈 Which colour of light is strongest in rgb(30, 9, 175)? (a) blue (b) green (c) red
  32. 32.🌈 Which colour is #ff0000? (a) black (b) white (c) yellow (d) red
  33. 33.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  34. 34.🌈 Which colour of light is strongest in rgb(202, 68, 25)? (a) red (b) green (c) blue
  35. 35.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #00ff00
  36. 36.🌈 Which hex code is yellow? (a) #000000 (b) #00ff00 (c) #0000ff (d) #ffff00
  37. 37.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(65, 233, 101)? (a) green (b) blue (c) red
  39. 39.🌈 In #0000b5 the blue part is the hex number b5. What is it as a normal number?
  40. 40.🌈 In #004c00 the green part is the hex number 4c. What is it as a normal number?

Answer key

  1. white
  2. magenta
  3. cyan
  4. blue
  5. blue
  6. #00ff00
  7. #ff0000
  8. blue
  9. bright green
  10. 95
  11. #00ffff
  12. yellow
  13. 143
  14. magenta
  15. 209
  16. blue
  17. green
  18. red
  19. #000000
  20. 143
  21. 255
  22. 211
  23. 124
  24. blue
  25. green
  26. 141
  27. 3
  28. 117
  29. yellow
  30. bright green
  31. blue
  32. red
  33. red
  34. red
  35. #0000ff
  36. #ffff00
  37. 40
  38. green
  39. 181
  40. 76

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