← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 170 · 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 first two digits give? (a) blue (b) green (c) black (d) red
  2. 2.🌈 Which colour of light is strongest in rgb(1, 167, 82)? (a) green (b) blue (c) red
  3. 3.🌈 Which colour is #0000ff? (a) black (b) blue (c) bright green (d) cyan
  4. 4.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) white (d) red
  5. 5.🌈 Which hex code is cyan? (a) #000000 (b) #ffffff (c) #ff00ff (d) #00ffff
  6. 6.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) cyan (c) black (d) bright green
  7. 7.🌈 Which colour is #ff0000? (a) cyan (b) red (c) magenta (d) blue
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  9. 9.🌈 In #005e00 the green part is the hex number 5e. What is it as a normal number?
  10. 10.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
  11. 11.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) cyan
  12. 12.🌈 In #000000 the green part is the hex number 00. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(250, 119, 0)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) white (d) magenta
  15. 15.🌈 In #000600 the green part is the hex number 06. What is it as a normal number?
  16. 16.🌈 Which colour is #ffffff? (a) bright green (b) white (c) magenta (d) yellow
  17. 17.🌈 Which colour is #000000? (a) cyan (b) black (c) magenta (d) yellow
  18. 18.🌈 Which colour of light is strongest in rgb(85, 163, 126)? (a) red (b) blue (c) green
  19. 19.🌈 Which colour is #ff00ff? (a) magenta (b) blue (c) bright green (d) white
  20. 20.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  21. 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  22. 22.🌈 Which hex code is red? (a) #ff00ff (b) #0000ff (c) #ffffff (d) #ff0000
  23. 23.🌈 In #930000 the red part is the hex number 93. What is it as a normal number?
  24. 24.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
  25. 25.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  26. 26.🌈 In #860000 the red part is the hex number 86. What is it as a normal number?
  27. 27.🌈 In #000057 the blue part is the hex number 57. What is it as a normal number?
  28. 28.🌈 Which hex code is white? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #00ff00
  29. 29.🌈 Which colour of light is strongest in rgb(172, 94, 85)? (a) green (b) red (c) blue
  30. 30.🌈 In #00006f the blue part is the hex number 6f. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) white (c) red (d) magenta
  32. 32.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #000000
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) bright green (d) magenta
  34. 34.🌈 In #000030 the blue part is the hex number 30. What is it as a normal number?
  35. 35.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #0000ff
  36. 36.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) blue (d) white
  37. 37.🌈 Which colour of light is strongest in rgb(97, 155, 129)? (a) green (b) red (c) blue
  38. 38.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?
  39. 39.🌈 Which colour is #ffff00? (a) yellow (b) black (c) magenta (d) cyan
  40. 40.🌈 In #003600 the green part is the hex number 36. What is it as a normal number?

Answer key

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

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