← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 148 · 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 rgb(0, 0, 255)? (a) yellow (b) white (c) cyan (d) blue
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  3. 3.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ffffff (d) #ff00ff
  4. 4.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) white (d) blue
  5. 5.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) magenta (d) white
  6. 6.🌈 Which colour is #000000? (a) red (b) black (c) white (d) blue
  7. 7.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) cyan (d) blue
  8. 8.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  10. 10.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) bright green (d) yellow
  11. 11.🌈 Which hex code is white? (a) #ffff00 (b) #ff0000 (c) #ffffff (d) #ff00ff
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  13. 13.🌈 Which colour is #ff00ff? (a) cyan (b) white (c) magenta (d) blue
  14. 14.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #000000
  15. 15.🌈 In #001500 the green part is the hex number 15. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(125, 223, 7)? (a) green (b) blue (c) red
  17. 17.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  18. 18.🌈 Which colour of light is strongest in rgb(59, 13, 226)? (a) green (b) red (c) blue
  19. 19.🌈 Which colour of light is strongest in rgb(157, 73, 98)? (a) green (b) blue (c) red
  20. 20.🌈 Which colour is #ff0000? (a) cyan (b) blue (c) red (d) black
  21. 21.🌈 Which colour of light is strongest in rgb(35, 36, 198)? (a) red (b) green (c) blue
  22. 22.🌈 In #00d100 the green part is the hex number d1. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) cyan (d) yellow
  24. 24.🌈 Which colour is #ffffff? (a) bright green (b) blue (c) magenta (d) white
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) cyan (d) blue
  26. 26.🌈 Which colour is #00ff00? (a) white (b) red (c) bright green (d) blue
  27. 27.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #00ffff
  28. 28.🌈 In #001f00 the green part is the hex number 1f. What is it as a normal number?
  29. 29.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) bright green (c) blue (d) yellow
  31. 31.🌈 Which colour of light is strongest in rgb(217, 115, 20)? (a) green (b) red (c) blue
  32. 32.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) magenta
  33. 33.🌈 In #0000b9 the blue part is the hex number b9. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(9, 226, 70)? (a) green (b) blue (c) red
  35. 35.🌈 Which colour of light is strongest in rgb(245, 1, 7)? (a) blue (b) green (c) red
  36. 36.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
  37. 37.🌈 In #00004f the blue part is the hex number 4f. What is it as a normal number?
  38. 38.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ffff
  39. 39.🌈 In #f00000 the red part is the hex number f0. What is it as a normal number?
  40. 40.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?

Answer key

  1. blue
  2. 3
  3. #ff00ff
  4. magenta
  5. cyan
  6. black
  7. black
  8. 255
  9. F
  10. red
  11. #ffffff
  12. red
  13. magenta
  14. #ff0000
  15. 21
  16. green
  17. blue
  18. blue
  19. red
  20. red
  21. blue
  22. 209
  23. bright green
  24. white
  25. cyan
  26. bright green
  27. #00ffff
  28. 31
  29. 9
  30. yellow
  31. red
  32. yellow
  33. 185
  34. green
  35. red
  36. 178
  37. 79
  38. #ffff00
  39. 240
  40. 155

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