← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 145 · 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 white? (a) #ff0000 (b) #000000 (c) #ffffff (d) #0000ff
  2. 2.🌈 Which colour of light is strongest in rgb(13, 162, 96)? (a) red (b) blue (c) green
  3. 3.🌈 Which colour is #ff0000? (a) red (b) yellow (c) black (d) magenta
  4. 4.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) white (c) black (d) bright green
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  6. 6.🌈 Which colour is #00ff00? (a) white (b) cyan (c) red (d) bright green
  7. 7.🌈 Which colour of light is strongest in rgb(124, 31, 154)? (a) red (b) green (c) blue
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
  9. 9.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ff00 (d) #ff00ff
  10. 10.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #00ff00 (d) #ff00ff
  11. 11.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?
  12. 12.🌈 In #000053 the blue part is the hex number 53. What is it as a normal number?
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  14. 14.🌈 Which colour of light is strongest in rgb(186, 74, 137)? (a) blue (b) red (c) green
  15. 15.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #ff0000
  16. 16.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  17. 17.🌈 In #4c0000 the red part is the hex number 4c. What is it as a normal number?
  18. 18.🌈 Which colour is #00ffff? (a) cyan (b) red (c) yellow (d) magenta
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) red (d) bright green
  20. 20.🌈 In #0000b0 the blue part is the hex number b0. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(65, 181, 54)? (a) red (b) blue (c) green
  22. 22.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  23. 23.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
  24. 24.🌈 In #008b00 the green part is the hex number 8b. What is it as a normal number?
  25. 25.🌈 In #000500 the green part is the hex number 05. What is it as a normal number?
  26. 26.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  27. 27.🌈 Which colour of light is strongest in rgb(90, 73, 197)? (a) green (b) red (c) blue
  28. 28.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?
  29. 29.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) black (d) blue
  30. 30.🌈 In #002600 the green part is the hex number 26. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) bright green (d) cyan
  32. 32.🌈 Which hex code is black? (a) #000000 (b) #ff0000 (c) #00ffff (d) #ffff00
  33. 33.🌈 In #550000 the red part is the hex number 55. What is it as a normal number?
  34. 34.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) cyan (c) yellow (d) white
  36. 36.🌈 Which hex code is yellow? (a) #00ffff (b) #ffffff (c) #ffff00 (d) #000000
  37. 37.🌈 Which colour is #0000ff? (a) cyan (b) white (c) yellow (d) blue
  38. 38.🌈 Which colour of light is strongest in rgb(50, 218, 131)? (a) green (b) red (c) blue
  39. 39.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) bright green (c) cyan (d) yellow
  40. 40.🌈 Which colour of light is strongest in rgb(232, 99, 125)? (a) blue (b) red (c) green

Answer key

  1. #ffffff
  2. green
  3. red
  4. bright green
  5. 3
  6. bright green
  7. blue
  8. red
  9. #00ff00
  10. #ff0000
  11. 151
  12. 83
  13. F
  14. red
  15. #00ffff
  16. 242
  17. 76
  18. cyan
  19. red
  20. 176
  21. green
  22. blue
  23. 229
  24. 139
  25. 5
  26. 255
  27. blue
  28. 194
  29. magenta
  30. 38
  31. cyan
  32. #000000
  33. 85
  34. 41
  35. white
  36. #ffff00
  37. blue
  38. green
  39. yellow
  40. red

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