← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 283 · 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 #150000 the red part is the hex number 15. What is it as a normal number?
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  4. 4.🌈 Which colour is #ff00ff? (a) bright green (b) blue (c) magenta (d) cyan
  5. 5.🌈 Which colour is #ffffff? (a) white (b) bright green (c) blue (d) red
  6. 6.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) yellow (c) bright green (d) magenta
  7. 7.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) black
  8. 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  10. 10.🌈 Which colour is #000000? (a) magenta (b) white (c) red (d) black
  11. 11.🌈 Which hex code is blue? (a) #ffff00 (b) #00ffff (c) #ffffff (d) #0000ff
  12. 12.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
  13. 13.🌈 In #000200 the green part is the hex number 02. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) white (d) yellow
  15. 15.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(45, 169, 6)? (a) red (b) green (c) blue
  17. 17.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) red (d) blue
  18. 18.🌈 In #001a00 the green part is the hex number 1a. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(40, 86, 196)? (a) blue (b) red (c) green
  20. 20.🌈 Which hex code is white? (a) #000000 (b) #ff00ff (c) #ffffff (d) #00ff00
  21. 21.🌈 Which hex code is cyan? (a) #ffffff (b) #0000ff (c) #00ffff (d) #000000
  22. 22.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  23. 23.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) yellow (d) blue
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) bright green (d) blue
  25. 25.🌈 Which colour of light is strongest in rgb(55, 121, 156)? (a) green (b) blue (c) red
  26. 26.🌈 In #004600 the green part is the hex number 46. What is it as a normal number?
  27. 27.🌈 Which colour is #ff0000? (a) red (b) blue (c) white (d) magenta
  28. 28.🌈 In #000000 the red part is the hex number 00. What is it as a normal number?
  29. 29.🌈 Which colour is #0000ff? (a) red (b) black (c) blue (d) bright green
  30. 30.🌈 In #050000 the red part is the hex number 05. What is it as a normal number?
  31. 31.🌈 Which hex code is red? (a) #ffff00 (b) #00ff00 (c) #ffffff (d) #ff0000
  32. 32.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) black (d) red
  33. 33.🌈 Which colour of light is strongest in rgb(135, 106, 212)? (a) green (b) blue (c) red
  34. 34.🌈 Which colour of light is strongest in rgb(12, 71, 176)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(68, 109, 172)? (a) red (b) green (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(136, 9, 187)? (a) red (b) green (c) blue
  37. 37.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
  38. 38.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
  39. 39.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
  40. 40.🌈 In #008f00 the green part is the hex number 8f. What is it as a normal number?

Answer key

  1. 21
  2. 255
  3. red
  4. magenta
  5. white
  6. magenta
  7. blue
  8. 3
  9. F
  10. black
  11. #0000ff
  12. 32
  13. 2
  14. bright green
  15. 143
  16. green
  17. cyan
  18. 26
  19. blue
  20. #ffffff
  21. #00ffff
  22. blue
  23. bright green
  24. white
  25. blue
  26. 70
  27. red
  28. 0
  29. blue
  30. 5
  31. #ff0000
  32. red
  33. blue
  34. blue
  35. blue
  36. blue
  37. 197
  38. 171
  39. 178
  40. 143

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