← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 346 · 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 yellow? (a) #ff00ff (b) #0000ff (c) #ffff00 (d) #00ffff
  2. 2.🌈 Which colour is #000000? (a) bright green (b) red (c) cyan (d) black
  3. 3.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffff00 (c) #000000 (d) #00ffff
  4. 4.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) blue (c) white (d) magenta
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  6. 6.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) white (d) red
  7. 7.🌈 In #f70000 the red part is the hex number f7. What is it as a normal number?
  8. 8.🌈 Which colour is #00ffff? (a) cyan (b) white (c) yellow (d) red
  9. 9.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) bright green (d) magenta
  10. 10.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) red (d) blue
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  12. 12.🌈 Which colour of light is strongest in rgb(31, 103, 168)? (a) green (b) red (c) blue
  13. 13.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) bright green (d) blue
  14. 14.🌈 Which colour is #00ff00? (a) magenta (b) white (c) yellow (d) bright green
  15. 15.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) cyan (c) black (d) magenta
  16. 16.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(12, 226, 23)? (a) blue (b) green (c) red
  18. 18.🌈 Which colour of light is strongest in rgb(139, 80, 163)? (a) green (b) red (c) blue
  19. 19.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) bright green (c) black (d) yellow
  20. 20.🌈 Which colour of light is strongest in rgb(209, 95, 17)? (a) green (b) blue (c) red
  21. 21.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) white (c) red (d) magenta
  22. 22.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  23. 23.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(198, 72, 52)? (a) red (b) blue (c) green
  25. 25.🌈 In #004400 the green part is the hex number 44. What is it as a normal number?
  26. 26.🌈 Which colour is #ff0000? (a) red (b) cyan (c) black (d) blue
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  28. 28.🌈 Which colour of light is strongest in rgb(99, 174, 44)? (a) blue (b) red (c) green
  29. 29.🌈 Which colour of light is strongest in rgb(220, 104, 32)? (a) blue (b) red (c) green
  30. 30.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  31. 31.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff00ff
  32. 32.🌈 In #0000ec the blue part is the hex number ec. What is it as a normal number?
  33. 33.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(221, 31, 21)? (a) red (b) blue (c) green
  35. 35.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
  36. 36.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(199, 84, 110)? (a) blue (b) red (c) green
  38. 38.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(14, 249, 126)? (a) green (b) red (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(35, 154, 133)? (a) red (b) green (c) blue

Answer key

  1. #ffff00
  2. black
  3. #00ffff
  4. white
  5. red
  6. bright green
  7. 247
  8. cyan
  9. blue
  10. blue
  11. blue
  12. blue
  13. magenta
  14. bright green
  15. magenta
  16. 222
  17. green
  18. blue
  19. yellow
  20. red
  21. red
  22. F
  23. 17
  24. red
  25. 68
  26. red
  27. 3
  28. green
  29. red
  30. 255
  31. #ff00ff
  32. 236
  33. 130
  34. red
  35. 75
  36. 26
  37. red
  38. 117
  39. green
  40. green

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