← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 50 · 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 hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #000000
  2. 2.🌈 In #0000a7 the blue part is the hex number a7. What is it as a normal number?
  3. 3.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #000000
  4. 4.🌈 Which colour is #0000ff? (a) magenta (b) bright green (c) blue (d) yellow
  5. 5.🌈 Which colour is #ffffff? (a) black (b) blue (c) red (d) white
  6. 6.🌈 Which colour is #000000? (a) magenta (b) bright green (c) blue (d) black
  7. 7.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) white (c) bright green (d) blue
  8. 8.🌈 Which colour of light is strongest in rgb(114, 187, 127)? (a) red (b) green (c) blue
  9. 9.🌈 Which hex code is black? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #000000
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  11. 11.🌈 Which colour is #ffff00? (a) red (b) magenta (c) yellow (d) blue
  12. 12.🌈 Which colour of light is strongest in rgb(62, 157, 75)? (a) green (b) red (c) blue
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
  14. 14.🌈 Which colour of light is strongest in rgb(93, 199, 3)? (a) blue (b) red (c) green
  15. 15.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) bright green (d) yellow
  16. 16.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) red (d) blue
  17. 17.🌈 Which colour of light is strongest in rgb(42, 84, 152)? (a) green (b) blue (c) red
  18. 18.🌈 Which hex code is red? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #ff0000
  19. 19.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) white (d) bright green
  20. 20.🌈 In #00009e the blue part is the hex number 9e. What is it as a normal number?
  21. 21.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(136, 90, 192)? (a) blue (b) green (c) red
  23. 23.🌈 In #d20000 the red part is the hex number d2. What is it as a normal number?
  24. 24.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  25. 25.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  26. 26.🌈 Which hex code is bright green? (a) #00ffff (b) #00ff00 (c) #ffffff (d) #ffff00
  27. 27.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) white (c) black (d) yellow
  29. 29.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) blue (d) white
  30. 30.🌈 In #00e100 the green part is the hex number e1. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(51, 102, 201)? (a) blue (b) red (c) green
  32. 32.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
  33. 33.🌈 In #00ba00 the green part is the hex number ba. What is it as a normal number?
  34. 34.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) red
  35. 35.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  36. 36.🌈 In #030000 the red part is the hex number 03. What is it as a normal number?
  37. 37.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
  38. 38.🌈 In #00001f the blue part is the hex number 1f. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(66, 234, 27)? (a) green (b) blue (c) red
  40. 40.🌈 Which colour is #00ffff? (a) black (b) yellow (c) bright green (d) cyan

Answer key

  1. #ffff00
  2. 167
  3. #ffffff
  4. blue
  5. white
  6. black
  7. blue
  8. green
  9. #000000
  10. F
  11. yellow
  12. green
  13. red
  14. green
  15. magenta
  16. white
  17. blue
  18. #ff0000
  19. cyan
  20. 158
  21. 22
  22. blue
  23. 210
  24. 255
  25. blue
  26. #00ff00
  27. 130
  28. black
  29. magenta
  30. 225
  31. blue
  32. 37
  33. 186
  34. yellow
  35. 3
  36. 3
  37. 225
  38. 31
  39. green
  40. cyan

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