← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 249 · 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.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  2. 2.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #ff00ff
  3. 3.🌈 Which colour of light is strongest in rgb(178, 74, 105)? (a) blue (b) green (c) red
  4. 4.🌈 Which colour of light is strongest in rgb(135, 131, 160)? (a) blue (b) green (c) red
  5. 5.🌈 In #000900 the green part is the hex number 09. What is it as a normal number?
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  7. 7.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) yellow (d) bright green
  8. 8.🌈 In #000071 the blue part is the hex number 71. What is it as a normal number?
  9. 9.🌈 In #0000a6 the blue part is the hex number a6. What is it as a normal number?
  10. 10.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ffff00
  11. 11.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) yellow (c) red (d) blue
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  13. 13.🌈 In #ca0000 the red part is the hex number ca. What is it as a normal number?
  14. 14.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) yellow (d) red
  15. 15.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) black (d) yellow
  16. 16.🌈 Which hex code is white? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #ff0000
  17. 17.🌈 Which colour of light is strongest in rgb(62, 181, 16)? (a) green (b) red (c) blue
  18. 18.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) red (c) yellow (d) blue
  19. 19.🌈 Which colour of light is strongest in rgb(10, 15, 176)? (a) green (b) red (c) blue
  20. 20.🌈 Which colour of light is strongest in rgb(120, 163, 134)? (a) blue (b) red (c) green
  21. 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  22. 22.🌈 Which colour is #ffffff? (a) blue (b) magenta (c) black (d) white
  23. 23.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) cyan (d) red
  24. 24.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
  25. 25.🌈 Which hex code is magenta? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #00ff00
  26. 26.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) magenta (d) cyan
  27. 27.🌈 Which colour of light is strongest in rgb(90, 116, 174)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) cyan (c) red (d) white
  29. 29.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
  30. 30.🌈 In #0000a8 the blue part is the hex number a8. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(99, 32, 232)? (a) green (b) red (c) blue
  32. 32.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(243, 84, 75)? (a) green (b) red (c) blue
  34. 34.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
  35. 35.🌈 Which colour is #00ff00? (a) blue (b) black (c) bright green (d) magenta
  36. 36.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) red (d) white
  37. 37.🌈 In #000078 the blue part is the hex number 78. What is it as a normal number?
  38. 38.🌈 Which hex code is yellow? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #00ffff
  39. 39.🌈 Which colour is #000000? (a) black (b) cyan (c) yellow (d) magenta
  40. 40.🌈 Which colour of light is strongest in rgb(162, 65, 49)? (a) green (b) red (c) blue

Answer key

  1. blue
  2. #ff0000
  3. red
  4. blue
  5. 9
  6. red
  7. red
  8. 113
  9. 166
  10. #00ff00
  11. blue
  12. F
  13. 202
  14. cyan
  15. blue
  16. #ffffff
  17. green
  18. yellow
  19. blue
  20. green
  21. 255
  22. white
  23. red
  24. 222
  25. #ff00ff
  26. black
  27. blue
  28. white
  29. 206
  30. 168
  31. blue
  32. 123
  33. red
  34. 227
  35. bright green
  36. magenta
  37. 120
  38. #ffff00
  39. black
  40. red

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