← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 312 · 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 colour is #ffffff? (a) white (b) black (c) cyan (d) red
  2. 2.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #00ff00 (d) #ffff00
  3. 3.🌈 Which colour is #ff0000? (a) bright green (b) blue (c) red (d) black
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
  5. 5.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
  6. 6.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
  7. 7.🌈 In #a50000 the red part is the hex number a5. What is it as a normal number?
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  9. 9.🌈 Which colour of light is strongest in rgb(21, 13, 178)? (a) red (b) green (c) blue
  10. 10.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) bright green (d) black
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) bright green (c) blue (d) red
  12. 12.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
  13. 13.🌈 Which hex code is black? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #000000
  14. 14.🌈 Which colour is #0000ff? (a) cyan (b) black (c) blue (d) red
  15. 15.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) bright green (d) black
  16. 16.🌈 In #ee0000 the red part is the hex number ee. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(61, 70, 198)? (a) red (b) green (c) blue
  18. 18.🌈 In #360000 the red part is the hex number 36. What is it as a normal number?
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  20. 20.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) white (c) bright green (d) magenta
  21. 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
  22. 22.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(169, 135, 113)? (a) green (b) blue (c) red
  24. 24.🌈 Which colour of light is strongest in rgb(247, 96, 118)? (a) blue (b) green (c) red
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) cyan (c) blue (d) magenta
  26. 26.🌈 Which hex code is white? (a) #000000 (b) #0000ff (c) #ff0000 (d) #ffffff
  27. 27.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
  28. 28.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #00ffff (d) #00ff00
  29. 29.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) bright green (d) cyan
  30. 30.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) bright green (d) yellow
  31. 31.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(244, 71, 38)? (a) blue (b) green (c) red
  33. 33.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
  34. 34.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) cyan (c) bright green (d) red
  35. 35.🌈 Which colour of light is strongest in rgb(123, 48, 173)? (a) blue (b) green (c) red
  36. 36.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) white (d) bright green
  37. 37.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(99, 180, 104)? (a) blue (b) green (c) red
  39. 39.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #00ff00
  40. 40.🌈 Which colour of light is strongest in rgb(154, 67, 75)? (a) blue (b) green (c) red

Answer key

  1. white
  2. #ff0000
  3. red
  4. red
  5. 210
  6. 163
  7. 165
  8. blue
  9. blue
  10. bright green
  11. red
  12. 92
  13. #000000
  14. blue
  15. cyan
  16. 238
  17. blue
  18. 54
  19. 255
  20. magenta
  21. F
  22. 155
  23. red
  24. red
  25. blue
  26. #ffffff
  27. 248
  28. #ff00ff
  29. black
  30. magenta
  31. 241
  32. red
  33. 12
  34. cyan
  35. blue
  36. white
  37. 40
  38. green
  39. #ffff00
  40. red

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