← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 280 · 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 of light is strongest in rgb(239, 19, 9)? (a) red (b) green (c) blue
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) red (d) bright green
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  5. 5.🌈 In #00e600 the green part is the hex number e6. What is it as a normal number?
  6. 6.🌈 Which colour is #000000? (a) blue (b) red (c) magenta (d) black
  7. 7.🌈 Which colour of light is strongest in rgb(98, 41, 210)? (a) blue (b) green (c) red
  8. 8.🌈 Which colour of light is strongest in rgb(176, 76, 7)? (a) blue (b) green (c) red
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  10. 10.🌈 Which colour is #ff00ff? (a) bright green (b) blue (c) magenta (d) red
  11. 11.🌈 Which colour is #ffff00? (a) bright green (b) blue (c) red (d) yellow
  12. 12.🌈 In #00ff00 the green part is the hex number ff. What is it as a normal number?
  13. 13.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) bright green
  15. 15.🌈 Which hex code is black? (a) #ffff00 (b) #ff0000 (c) #ffffff (d) #000000
  16. 16.🌈 Which colour is #00ff00? (a) cyan (b) red (c) magenta (d) bright green
  17. 17.🌈 Which colour of light is strongest in rgb(102, 212, 1)? (a) blue (b) green (c) red
  18. 18.🌈 Which colour of light is strongest in rgb(106, 130, 222)? (a) red (b) green (c) blue
  19. 19.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  20. 20.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  21. 21.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) blue (d) yellow
  22. 22.🌈 In #0000db the blue part is the hex number db. What is it as a normal number?
  23. 23.🌈 In #003c00 the green part is the hex number 3c. What is it as a normal number?
  24. 24.🌈 Which colour is #ffffff? (a) cyan (b) magenta (c) red (d) white
  25. 25.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #0000ff
  26. 26.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) bright green (d) cyan
  27. 27.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffff00 (c) #000000 (d) #00ffff
  28. 28.🌈 Which colour is #ff0000? (a) bright green (b) cyan (c) white (d) red
  29. 29.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
  30. 30.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
  31. 31.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(249, 68, 130)? (a) blue (b) red (c) green
  33. 33.🌈 Which colour is #00ffff? (a) black (b) bright green (c) cyan (d) blue
  34. 34.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #ffff00 (d) #0000ff
  35. 35.🌈 Which colour is #0000ff? (a) red (b) magenta (c) blue (d) white
  36. 36.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #ffffff
  37. 37.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
  38. 38.🌈 In #00d500 the green part is the hex number d5. What is it as a normal number?
  39. 39.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) yellow (d) white
  40. 40.🌈 In #fc0000 the red part is the hex number fc. What is it as a normal number?

Answer key

  1. red
  2. bright green
  3. F
  4. red
  5. 230
  6. black
  7. blue
  8. red
  9. 255
  10. magenta
  11. yellow
  12. 255
  13. 202
  14. blue
  15. #000000
  16. bright green
  17. green
  18. blue
  19. blue
  20. 3
  21. red
  22. 219
  23. 60
  24. white
  25. #0000ff
  26. cyan
  27. #00ffff
  28. red
  29. 227
  30. 249
  31. 217
  32. red
  33. cyan
  34. #ffffff
  35. blue
  36. #ff00ff
  37. 156
  38. 213
  39. black
  40. 252

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