← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 160 · 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(255, 255, 255)? (a) yellow (b) blue (c) white (d) red
  2. 2.🌈 In #bd0000 the red part is the hex number bd. What is it as a normal number?
  3. 3.🌈 Which colour is #000000? (a) cyan (b) blue (c) black (d) magenta
  4. 4.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #ffffff (d) #000000
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  6. 6.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) bright green (c) cyan (d) black
  7. 7.🌈 In #1a0000 the red part is the hex number 1a. What is it as a normal number?
  8. 8.🌈 Which colour of light is strongest in rgb(107, 114, 189)? (a) blue (b) green (c) red
  9. 9.🌈 Which colour of light is strongest in rgb(172, 15, 11)? (a) red (b) green (c) blue
  10. 10.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) red (c) magenta (d) bright green
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  12. 12.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #000000
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  14. 14.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ff00ff
  15. 15.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) yellow (c) red (d) bright green
  16. 16.🌈 Which colour of light is strongest in rgb(30, 176, 43)? (a) green (b) red (c) blue
  17. 17.🌈 Which colour is #ff00ff? (a) black (b) magenta (c) white (d) blue
  18. 18.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ff00ff
  19. 19.🌈 Which colour of light is strongest in rgb(9, 58, 162)? (a) blue (b) red (c) green
  20. 20.🌈 In #000076 the blue part is the hex number 76. What is it as a normal number?
  21. 21.🌈 In #a90000 the red part is the hex number a9. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(59, 179, 23)? (a) blue (b) green (c) red
  23. 23.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) magenta (d) white
  24. 24.🌈 Which colour of light is strongest in rgb(58, 47, 151)? (a) green (b) red (c) blue
  25. 25.🌈 Which colour is #ffff00? (a) blue (b) red (c) cyan (d) yellow
  26. 26.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  27. 27.🌈 Which colour is #ff0000? (a) black (b) magenta (c) white (d) red
  28. 28.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ffffff (d) #ffff00
  29. 29.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) blue (d) black
  30. 30.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
  31. 31.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #000000
  32. 32.🌈 In #000004 the blue part is the hex number 04. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) magenta (d) bright green
  34. 34.🌈 Which colour is #ffffff? (a) red (b) bright green (c) white (d) yellow
  35. 35.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
  36. 36.🌈 In #00001d the blue part is the hex number 1d. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(31, 218, 132)? (a) blue (b) red (c) green
  38. 38.🌈 Which colour of light is strongest in rgb(206, 54, 11)? (a) red (b) blue (c) green
  39. 39.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) white (d) blue
  40. 40.🌈 Which colour of light is strongest in rgb(101, 106, 176)? (a) red (b) blue (c) green

Answer key

  1. white
  2. 189
  3. black
  4. #0000ff
  5. blue
  6. black
  7. 26
  8. blue
  9. red
  10. magenta
  11. F
  12. #ff0000
  13. red
  14. #000000
  15. bright green
  16. green
  17. magenta
  18. #00ffff
  19. blue
  20. 118
  21. 169
  22. green
  23. cyan
  24. blue
  25. yellow
  26. 3
  27. red
  28. #00ff00
  29. red
  30. 50
  31. #ff00ff
  32. 4
  33. blue
  34. white
  35. 255
  36. 29
  37. green
  38. red
  39. bright green
  40. blue

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