← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 38 · 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(0, 255, 0)? (a) magenta (b) blue (c) white (d) bright green
  2. 2.🌈 Which colour is #000000? (a) bright green (b) cyan (c) black (d) blue
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  4. 4.🌈 In #00b600 the green part is the hex number b6. What is it as a normal number?
  5. 5.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ffffff (d) #ff00ff
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  7. 7.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) bright green (d) red
  8. 8.🌈 In #00e200 the green part is the hex number e2. What is it as a normal number?
  9. 9.🌈 Which colour is #00ffff? (a) white (b) magenta (c) bright green (d) cyan
  10. 10.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) cyan (c) red (d) magenta
  11. 11.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #ff00ff
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  14. 14.🌈 Which colour of light is strongest in rgb(137, 60, 228)? (a) green (b) red (c) blue
  15. 15.🌈 Which colour is #ffffff? (a) white (b) black (c) bright green (d) red
  16. 16.🌈 Which colour of light is strongest in rgb(174, 36, 106)? (a) green (b) red (c) blue
  17. 17.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #0000ff
  18. 18.🌈 In #000006 the blue part is the hex number 06. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) bright green (d) black
  20. 20.🌈 Which colour of light is strongest in rgb(239, 39, 22)? (a) blue (b) green (c) red
  21. 21.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
  22. 22.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) magenta
  23. 23.🌈 Which hex code is black? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffffff
  24. 24.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) red
  25. 25.🌈 Which colour of light is strongest in rgb(20, 215, 124)? (a) red (b) blue (c) green
  26. 26.🌈 Which colour of light is strongest in rgb(191, 95, 85)? (a) blue (b) red (c) green
  27. 27.🌈 Which colour of light is strongest in rgb(9, 35, 167)? (a) blue (b) red (c) green
  28. 28.🌈 Which colour is #ff0000? (a) bright green (b) cyan (c) black (d) red
  29. 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  30. 30.🌈 In #000020 the blue part is the hex number 20. What is it as a normal number?
  31. 31.🌈 In #c30000 the red part is the hex number c3. What is it as a normal number?
  32. 32.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ff0000
  33. 33.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) blue (c) cyan (d) white
  34. 34.🌈 Which colour of light is strongest in rgb(130, 73, 200)? (a) blue (b) red (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(21, 204, 39)? (a) red (b) green (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(38, 111, 240)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour of light is strongest in rgb(35, 187, 27)? (a) red (b) blue (c) green
  38. 38.🌈 Which colour of light is strongest in rgb(247, 89, 79)? (a) green (b) blue (c) red
  39. 39.🌈 In #006700 the green part is the hex number 67. What is it as a normal number?
  40. 40.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) red (d) bright green

Answer key

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

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