← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 256 · 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 hex code is black? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #000000
  2. 2.🌈 In #009500 the green part is the hex number 95. What is it as a normal number?
  3. 3.🌈 In #009d00 the green part is the hex number 9d. What is it as a normal number?
  4. 4.🌈 In #0000d9 the blue part is the hex number d9. What is it as a normal number?
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  6. 6.🌈 Which colour is #0000ff? (a) red (b) blue (c) yellow (d) bright green
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  8. 8.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) yellow (c) black (d) bright green
  10. 10.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #0000ff (d) #00ffff
  11. 11.🌈 Which colour of light is strongest in rgb(168, 55, 60)? (a) red (b) green (c) blue
  12. 12.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ff00
  13. 13.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) cyan (d) red
  14. 14.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) red (d) black
  15. 15.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) red (d) black
  16. 16.🌈 In #a80000 the red part is the hex number a8. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(96, 139, 176)? (a) red (b) blue (c) green
  18. 18.🌈 Which hex code is magenta? (a) #00ff00 (b) #0000ff (c) #ff00ff (d) #00ffff
  19. 19.🌈 Which colour of light is strongest in rgb(16, 84, 186)? (a) red (b) green (c) blue
  20. 20.🌈 Which colour of light is strongest in rgb(129, 178, 75)? (a) green (b) blue (c) red
  21. 21.🌈 Which colour of light is strongest in rgb(82, 74, 223)? (a) green (b) blue (c) red
  22. 22.🌈 Which colour is #ff0000? (a) red (b) blue (c) yellow (d) white
  23. 23.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  24. 24.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) cyan (d) bright green
  25. 25.🌈 Which colour of light is strongest in rgb(91, 121, 251)? (a) red (b) blue (c) green
  26. 26.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  28. 28.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) red (d) bright green
  29. 29.🌈 Which hex code is yellow? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #ff00ff
  30. 30.🌈 Which colour is #ffff00? (a) black (b) blue (c) yellow (d) white
  31. 31.🌈 Which colour of light is strongest in rgb(251, 52, 63)? (a) blue (b) red (c) green
  32. 32.🌈 Which colour is #000000? (a) black (b) magenta (c) yellow (d) white
  33. 33.🌈 Which colour of light is strongest in rgb(213, 97, 98)? (a) green (b) red (c) blue
  34. 34.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  35. 35.🌈 Which colour of light is strongest in rgb(74, 127, 159)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(182, 43, 31)? (a) green (b) red (c) blue
  37. 37.🌈 Which colour of light is strongest in rgb(229, 115, 16)? (a) green (b) blue (c) red
  38. 38.🌈 In #e20000 the red part is the hex number e2. What is it as a normal number?
  39. 39.🌈 Which colour is #00ff00? (a) black (b) magenta (c) bright green (d) white
  40. 40.🌈 In #00f700 the green part is the hex number f7. What is it as a normal number?

Answer key

  1. #000000
  2. 149
  3. 157
  4. 217
  5. red
  6. blue
  7. F
  8. 243
  9. bright green
  10. #00ffff
  11. red
  12. #ffffff
  13. white
  14. cyan
  15. magenta
  16. 168
  17. blue
  18. #ff00ff
  19. blue
  20. green
  21. blue
  22. red
  23. blue
  24. magenta
  25. blue
  26. 41
  27. 3
  28. black
  29. #ffff00
  30. yellow
  31. red
  32. black
  33. red
  34. 255
  35. blue
  36. red
  37. red
  38. 226
  39. bright green
  40. 247

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