← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 84 · 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.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  3. 3.🌈 Which colour of light is strongest in rgb(1, 17, 246)? (a) green (b) blue (c) red
  4. 4.🌈 Which hex code is yellow? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ffff00
  5. 5.🌈 Which colour is #000000? (a) cyan (b) red (c) black (d) bright green
  6. 6.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) black (c) bright green (d) blue
  7. 7.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) blue (d) red
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  9. 9.🌈 Which colour of light is strongest in rgb(33, 65, 195)? (a) green (b) red (c) blue
  10. 10.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) magenta (c) blue (d) bright green
  11. 11.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  12. 12.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(255, 8, 12)? (a) red (b) blue (c) green
  14. 14.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) magenta (d) black
  15. 15.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(64, 133, 206)? (a) red (b) blue (c) green
  17. 17.🌈 Which colour of light is strongest in rgb(41, 0, 170)? (a) red (b) green (c) blue
  18. 18.🌈 Which colour of light is strongest in rgb(206, 139, 83)? (a) red (b) green (c) blue
  19. 19.🌈 Which colour of light is strongest in rgb(41, 33, 161)? (a) blue (b) green (c) red
  20. 20.🌈 Which colour is #ffff00? (a) yellow (b) magenta (c) cyan (d) red
  21. 21.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) magenta (d) black
  22. 22.🌈 In #00008e the blue part is the hex number 8e. What is it as a normal number?
  23. 23.🌈 Which hex code is red? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #00ff00
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) black (d) yellow
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) magenta (d) white
  26. 26.🌈 In #8c0000 the red part is the hex number 8c. What is it as a normal number?
  27. 27.🌈 In #f70000 the red part is the hex number f7. What is it as a normal number?
  28. 28.🌈 In #000024 the blue part is the hex number 24. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(232, 126, 136)? (a) blue (b) red (c) green
  30. 30.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
  31. 31.🌈 In #009200 the green part is the hex number 92. What is it as a normal number?
  32. 32.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  33. 33.🌈 Which colour is #ff00ff? (a) cyan (b) bright green (c) black (d) magenta
  34. 34.🌈 Which colour of light is strongest in rgb(119, 29, 192)? (a) blue (b) green (c) red
  35. 35.🌈 In #005b00 the green part is the hex number 5b. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(103, 157, 25)? (a) green (b) red (c) blue
  37. 37.🌈 Which colour of light is strongest in rgb(59, 206, 15)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour is #0000ff? (a) bright green (b) cyan (c) blue (d) red
  39. 39.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  40. 40.🌈 In #0000e8 the blue part is the hex number e8. What is it as a normal number?

Answer key

  1. blue
  2. red
  3. blue
  4. #ffff00
  5. black
  6. blue
  7. cyan
  8. F
  9. blue
  10. magenta
  11. 255
  12. 171
  13. red
  14. red
  15. 241
  16. blue
  17. blue
  18. red
  19. blue
  20. yellow
  21. bright green
  22. 142
  23. #ff0000
  24. white
  25. black
  26. 140
  27. 247
  28. 36
  29. red
  30. 243
  31. 146
  32. 10
  33. magenta
  34. blue
  35. 91
  36. green
  37. green
  38. blue
  39. 3
  40. 232

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