← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 343 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  2. 2.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #000000 (d) #00ff00
  3. 3.🌈 Which hex code is bright green? (a) #000000 (b) #ffffff (c) #ff0000 (d) #00ff00
  4. 4.🌈 Which colour of light is strongest in rgb(19, 197, 110)? (a) red (b) blue (c) green
  5. 5.🌈 Which colour of light is strongest in rgb(96, 225, 69)? (a) red (b) green (c) blue
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  7. 7.🌈 Which colour of light is strongest in rgb(34, 29, 171)? (a) red (b) blue (c) green
  8. 8.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) white (d) red
  9. 9.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) white (d) magenta
  10. 10.🌈 In #410000 the red part is the hex number 41. What is it as a normal number?
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  12. 12.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  14. 14.🌈 Which colour of light is strongest in rgb(27, 137, 235)? (a) green (b) red (c) blue
  15. 15.🌈 Which colour of light is strongest in rgb(213, 42, 87)? (a) green (b) red (c) blue
  16. 16.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) cyan (d) black
  17. 17.🌈 Which colour is #ff0000? (a) red (b) white (c) bright green (d) black
  18. 18.🌈 Which colour of light is strongest in rgb(223, 9, 129)? (a) red (b) blue (c) green
  19. 19.🌈 In #0000ab the blue part is the hex number ab. What is it as a normal number?
  20. 20.🌈 Which colour of light is strongest in rgb(76, 96, 173)? (a) red (b) green (c) blue
  21. 21.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) cyan (d) bright green
  22. 22.🌈 Which hex code is yellow? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #ffff00
  23. 23.🌈 Which colour of light is strongest in rgb(19, 150, 135)? (a) blue (b) green (c) red
  24. 24.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  25. 25.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #00ffff (d) #00ff00
  26. 26.🌈 Which colour of light is strongest in rgb(188, 91, 114)? (a) blue (b) green (c) red
  27. 27.🌈 Which colour is #ffffff? (a) white (b) red (c) yellow (d) cyan
  28. 28.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) magenta (d) yellow
  29. 29.🌈 Which colour is #00ffff? (a) cyan (b) red (c) magenta (d) black
  30. 30.🌈 Which colour is #0000ff? (a) black (b) blue (c) red (d) magenta
  31. 31.🌈 Which colour of light is strongest in rgb(174, 121, 103)? (a) blue (b) red (c) green
  32. 32.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #00ffff
  33. 33.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) black (c) blue (d) red
  34. 34.🌈 Which colour of light is strongest in rgb(74, 113, 174)? (a) blue (b) green (c) red
  35. 35.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
  36. 36.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ff00ff
  37. 37.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #ff0000
  38. 38.🌈 In #000007 the blue part is the hex number 07. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(31, 58, 158)? (a) blue (b) green (c) red
  40. 40.🌈 In #00cb00 the green part is the hex number cb. What is it as a normal number?

Answer key

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

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