← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 188 · 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 #f00000 the red part is the hex number f0. What is it as a normal number?
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  3. 3.🌈 Which colour of light is strongest in rgb(239, 63, 4)? (a) blue (b) green (c) red
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  6. 6.🌈 Which colour is #ffffff? (a) magenta (b) white (c) cyan (d) blue
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  8. 8.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #ffffff (d) #00ff00
  9. 9.🌈 Which colour is #00ffff? (a) white (b) cyan (c) black (d) bright green
  10. 10.🌈 Which colour of light is strongest in rgb(81, 18, 220)? (a) green (b) red (c) blue
  11. 11.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) blue (d) magenta
  12. 12.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
  13. 13.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #0000ff (d) #00ffff
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) white (c) red (d) cyan
  15. 15.🌈 Which colour is #ffff00? (a) red (b) black (c) yellow (d) cyan
  16. 16.🌈 Which colour of light is strongest in rgb(16, 239, 19)? (a) green (b) blue (c) red
  17. 17.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) red (c) blue (d) black
  18. 18.🌈 Which colour of light is strongest in rgb(14, 223, 136)? (a) green (b) blue (c) red
  19. 19.🌈 Which colour of light is strongest in rgb(73, 12, 159)? (a) blue (b) green (c) red
  20. 20.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) yellow (c) white (d) bright green
  21. 21.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
  22. 22.🌈 Which hex code is red? (a) #ffffff (b) #0000ff (c) #000000 (d) #ff0000
  23. 23.🌈 In #00a500 the green part is the hex number a5. What is it as a normal number?
  24. 24.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) red (d) cyan
  25. 25.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffffff
  26. 26.🌈 Which colour of light is strongest in rgb(112, 191, 75)? (a) red (b) green (c) blue
  27. 27.🌈 Which colour is #ff0000? (a) blue (b) bright green (c) cyan (d) red
  28. 28.🌈 Which colour of light is strongest in rgb(112, 198, 15)? (a) blue (b) red (c) green
  29. 29.🌈 In #0000d6 the blue part is the hex number d6. What is it as a normal number?
  30. 30.🌈 Which colour is #000000? (a) white (b) yellow (c) black (d) magenta
  31. 31.🌈 Which colour is #0000ff? (a) yellow (b) red (c) white (d) blue
  32. 32.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
  33. 33.🌈 In #af0000 the red part is the hex number af. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(47, 164, 9)? (a) blue (b) green (c) red
  35. 35.🌈 Which hex code is white? (a) #00ff00 (b) #ff00ff (c) #0000ff (d) #ffffff
  36. 36.🌈 Which colour is #ff00ff? (a) bright green (b) red (c) magenta (d) blue
  37. 37.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(226, 91, 5)? (a) red (b) green (c) blue
  39. 39.🌈 Which hex code is blue? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #00ffff
  40. 40.🌈 In #003a00 the green part is the hex number 3a. What is it as a normal number?

Answer key

  1. 240
  2. blue
  3. red
  4. F
  5. 255
  6. white
  7. 3
  8. #000000
  9. cyan
  10. blue
  11. cyan
  12. 67
  13. #ffff00
  14. bright green
  15. yellow
  16. green
  17. blue
  18. green
  19. blue
  20. white
  21. red
  22. #ff0000
  23. 165
  24. black
  25. #ff00ff
  26. green
  27. red
  28. green
  29. 214
  30. black
  31. blue
  32. 92
  33. 175
  34. green
  35. #ffffff
  36. magenta
  37. 147
  38. red
  39. #0000ff
  40. 58

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