← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 329 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
  2. 2.🌈 In #0000e3 the blue part is the hex number e3. What is it as a normal number?
  3. 3.🌈 Which hex code is cyan? (a) #00ffff (b) #00ff00 (c) #ff00ff (d) #ff0000
  4. 4.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
  5. 5.🌈 In #a30000 the red part is the hex number a3. What is it as a normal number?
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
  7. 7.🌈 Which colour of light is strongest in rgb(52, 249, 135)? (a) blue (b) green (c) red
  8. 8.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ffffff
  9. 9.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  11. 11.🌈 Which colour of light is strongest in rgb(69, 1, 179)? (a) blue (b) red (c) green
  12. 12.🌈 Which hex code is black? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #000000
  13. 13.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) bright green (d) black
  14. 14.🌈 Which hex code is red? (a) #00ffff (b) #ffffff (c) #ff0000 (d) #ffff00
  15. 15.🌈 Which colour is #ff00ff? (a) bright green (b) white (c) magenta (d) blue
  16. 16.🌈 In #007200 the green part is the hex number 72. What is it as a normal number?
  17. 17.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
  18. 18.🌈 In #e30000 the red part is the hex number e3. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) black (c) yellow (d) red
  20. 20.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff00ff (c) #ff0000 (d) #00ffff
  21. 21.🌈 Which colour of light is strongest in rgb(33, 160, 19)? (a) blue (b) red (c) green
  22. 22.🌈 In #960000 the red part is the hex number 96. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(156, 87, 55)? (a) green (b) blue (c) red
  24. 24.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  25. 25.🌈 Which hex code is blue? (a) #000000 (b) #00ff00 (c) #00ffff (d) #0000ff
  26. 26.🌈 Which colour is #000000? (a) black (b) white (c) cyan (d) red
  27. 27.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  28. 28.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(21, 111, 240)? (a) green (b) blue (c) red
  30. 30.🌈 Which colour of light is strongest in rgb(110, 65, 237)? (a) red (b) green (c) blue
  31. 31.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) cyan (c) magenta (d) yellow
  32. 32.🌈 In #004000 the green part is the hex number 40. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(24, 36, 150)? (a) green (b) red (c) blue
  34. 34.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) black (d) red
  36. 36.🌈 In #00d700 the green part is the hex number d7. What is it as a normal number?
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) black (d) bright green
  38. 38.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) white (d) magenta
  39. 39.🌈 Which colour is #00ffff? (a) black (b) red (c) magenta (d) cyan
  40. 40.🌈 Which colour is #00ff00? (a) red (b) cyan (c) bright green (d) black

Answer key

  1. 3
  2. 227
  3. #00ffff
  4. 30
  5. 163
  6. 255
  7. green
  8. #00ff00
  9. 128
  10. red
  11. blue
  12. #000000
  13. bright green
  14. #ff0000
  15. magenta
  16. 114
  17. blue
  18. 227
  19. red
  20. #ff00ff
  21. green
  22. 150
  23. red
  24. F
  25. #0000ff
  26. black
  27. 132
  28. 242
  29. blue
  30. blue
  31. yellow
  32. 64
  33. blue
  34. 40
  35. white
  36. 215
  37. black
  38. blue
  39. cyan
  40. bright green

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