← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 34 · 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 #001b00 the green part is the hex number 1b. What is it as a normal number?
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  3. 3.🌈 Which colour of light is strongest in rgb(67, 175, 9)? (a) blue (b) red (c) green
  4. 4.🌈 In #0000c2 the blue part is the hex number c2. What is it as a normal number?
  5. 5.🌈 Which hex code is red? (a) #ff00ff (b) #ff0000 (c) #0000ff (d) #ffffff
  6. 6.🌈 In #880000 the red part is the hex number 88. What is it as a normal number?
  7. 7.🌈 Which colour of light is strongest in rgb(6, 102, 200)? (a) red (b) blue (c) green
  8. 8.🌈 Which colour of light is strongest in rgb(37, 54, 241)? (a) green (b) red (c) blue
  9. 9.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(109, 154, 24)? (a) red (b) green (c) blue
  11. 11.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) cyan (c) yellow (d) bright green
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  13. 13.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  14. 14.🌈 Which colour of light is strongest in rgb(253, 51, 9)? (a) blue (b) green (c) red
  15. 15.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
  16. 16.🌈 Which colour is #ffff00? (a) red (b) cyan (c) yellow (d) blue
  17. 17.🌈 Which colour is #00ff00? (a) cyan (b) blue (c) black (d) bright green
  18. 18.🌈 Which colour is #ffffff? (a) white (b) magenta (c) cyan (d) yellow
  19. 19.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) red (d) black
  20. 20.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  21. 21.🌈 Which colour of light is strongest in rgb(185, 20, 19)? (a) red (b) blue (c) green
  22. 22.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) yellow (d) blue
  23. 23.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) bright green (d) red
  24. 24.🌈 Which colour of light is strongest in rgb(174, 1, 6)? (a) red (b) green (c) blue
  25. 25.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #000000 (d) #ffff00
  26. 26.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #0000ff
  27. 27.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  28. 28.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
  29. 29.🌈 Which colour is #0000ff? (a) red (b) cyan (c) black (d) blue
  30. 30.🌈 Which colour of light is strongest in rgb(4, 61, 245)? (a) green (b) blue (c) red
  31. 31.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
  32. 32.🌈 Which colour is #000000? (a) magenta (b) blue (c) black (d) bright green
  33. 33.🌈 Which colour of light is strongest in rgb(186, 92, 47)? (a) red (b) green (c) blue
  34. 34.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #ffffff (d) #ff00ff
  35. 35.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
  36. 36.🌈 In #d50000 the red part is the hex number d5. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) bright green (d) red
  38. 38.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) yellow (c) magenta (d) cyan
  39. 39.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) red (c) yellow (d) magenta
  40. 40.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?

Answer key

  1. 27
  2. 3
  3. green
  4. 194
  5. #ff0000
  6. 136
  7. blue
  8. blue
  9. 52
  10. green
  11. yellow
  12. red
  13. blue
  14. red
  15. 16
  16. yellow
  17. bright green
  18. white
  19. magenta
  20. 255
  21. red
  22. white
  23. bright green
  24. red
  25. #0000ff
  26. #00ff00
  27. F
  28. 78
  29. blue
  30. blue
  31. 180
  32. black
  33. red
  34. #ffffff
  35. 75
  36. 213
  37. red
  38. cyan
  39. magenta
  40. 129

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