← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 344 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  2. 2.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) black (d) white
  3. 3.🌈 Which colour of light is strongest in rgb(22, 241, 139)? (a) blue (b) red (c) green
  4. 4.🌈 Which colour of light is strongest in rgb(124, 172, 60)? (a) blue (b) red (c) green
  5. 5.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
  6. 6.🌈 Which colour of light is strongest in rgb(132, 132, 167)? (a) red (b) green (c) blue
  7. 7.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #ffff00
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  10. 10.🌈 Which colour is #00ffff? (a) black (b) white (c) blue (d) cyan
  11. 11.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
  12. 12.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(4, 192, 41)? (a) green (b) blue (c) red
  14. 14.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) yellow (c) white (d) black
  15. 15.🌈 Which colour of light is strongest in rgb(77, 184, 136)? (a) red (b) blue (c) green
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  17. 17.🌈 Which hex code is blue? (a) #ffffff (b) #000000 (c) #00ffff (d) #0000ff
  18. 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  19. 19.🌈 Which colour of light is strongest in rgb(8, 135, 215)? (a) green (b) red (c) blue
  20. 20.🌈 Which colour is #ffff00? (a) red (b) white (c) yellow (d) bright green
  21. 21.🌈 Which colour is #0000ff? (a) white (b) black (c) cyan (d) blue
  22. 22.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) red (c) blue (d) cyan
  23. 23.🌈 Which colour of light is strongest in rgb(91, 205, 71)? (a) blue (b) red (c) green
  24. 24.🌈 Which colour of light is strongest in rgb(45, 75, 230)? (a) green (b) red (c) blue
  25. 25.🌈 In #000086 the blue part is the hex number 86. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) white (c) magenta (d) blue
  27. 27.🌈 In #2b0000 the red part is the hex number 2b. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(84, 56, 158)? (a) blue (b) red (c) green
  29. 29.🌈 Which colour of light is strongest in rgb(215, 75, 75)? (a) blue (b) green (c) red
  30. 30.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) black (c) blue (d) yellow
  31. 31.🌈 Which colour is #00ff00? (a) black (b) yellow (c) magenta (d) bright green
  32. 32.🌈 Which colour of light is strongest in rgb(130, 1, 170)? (a) red (b) blue (c) green
  33. 33.🌈 In #a50000 the red part is the hex number a5. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(68, 84, 196)? (a) green (b) blue (c) red
  35. 35.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) bright green (d) cyan
  36. 36.🌈 Which colour of light is strongest in rgb(71, 174, 70)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(28, 20, 203)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour is #ff0000? (a) red (b) blue (c) black (d) white
  39. 39.🌈 Which colour is #ff00ff? (a) blue (b) black (c) magenta (d) red
  40. 40.🌈 Which colour is #ffffff? (a) magenta (b) black (c) white (d) blue

Answer key

  1. 3
  2. white
  3. green
  4. green
  5. 84
  6. blue
  7. #ff0000
  8. red
  9. blue
  10. cyan
  11. 80
  12. 242
  13. green
  14. black
  15. green
  16. 255
  17. #0000ff
  18. F
  19. blue
  20. yellow
  21. blue
  22. cyan
  23. green
  24. blue
  25. 134
  26. blue
  27. 43
  28. blue
  29. red
  30. yellow
  31. bright green
  32. blue
  33. 165
  34. blue
  35. magenta
  36. green
  37. blue
  38. red
  39. magenta
  40. white

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