← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 255 · 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, 255)? (a) bright green (b) yellow (c) red (d) cyan
  2. 2.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ffff00
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  4. 4.🌈 Which colour is #000000? (a) yellow (b) red (c) cyan (d) black
  5. 5.🌈 Which colour of light is strongest in rgb(55, 176, 95)? (a) red (b) blue (c) green
  6. 6.🌈 In #007800 the green part is the hex number 78. What is it as a normal number?
  7. 7.🌈 In #00b500 the green part is the hex number b5. What is it as a normal number?
  8. 8.🌈 Which colour is #ffff00? (a) bright green (b) black (c) yellow (d) red
  9. 9.🌈 Which colour is #ffffff? (a) cyan (b) white (c) black (d) red
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  11. 11.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #0000ff
  12. 12.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #ff0000 (d) #00ff00
  13. 13.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) black (d) blue
  14. 14.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  15. 15.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) magenta (d) blue
  16. 16.🌈 Which colour is #00ff00? (a) magenta (b) red (c) bright green (d) blue
  17. 17.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  18. 18.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #ff0000 (d) #00ff00
  19. 19.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) bright green (d) blue
  20. 20.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) magenta (d) red
  21. 21.🌈 In #00c900 the green part is the hex number c9. What is it as a normal number?
  22. 22.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
  23. 23.🌈 In #0000b1 the blue part is the hex number b1. What is it as a normal number?
  24. 24.🌈 In #7f0000 the red part is the hex number 7f. What is it as a normal number?
  25. 25.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(155, 84, 125)? (a) blue (b) red (c) green
  27. 27.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
  28. 28.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
  29. 29.🌈 Which hex code is red? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #ffffff
  30. 30.🌈 Which colour of light is strongest in rgb(34, 156, 105)? (a) green (b) blue (c) red
  31. 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
  32. 32.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) cyan (d) blue
  33. 33.🌈 Which colour of light is strongest in rgb(75, 112, 167)? (a) blue (b) red (c) green
  34. 34.🌈 Which colour of light is strongest in rgb(34, 206, 42)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(27, 76, 175)? (a) green (b) blue (c) red
  36. 36.🌈 In #0000e6 the blue part is the hex number e6. What is it as a normal number?
  37. 37.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
  38. 38.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ffff
  39. 39.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  40. 40.🌈 In #ae0000 the red part is the hex number ae. What is it as a normal number?

Answer key

  1. cyan
  2. #ffff00
  3. red
  4. black
  5. green
  6. 120
  7. 181
  8. yellow
  9. white
  10. 3
  11. #00ff00
  12. #00ffff
  13. black
  14. 255
  15. blue
  16. bright green
  17. blue
  18. #000000
  19. bright green
  20. red
  21. 201
  22. 196
  23. 177
  24. 127
  25. 55
  26. red
  27. 116
  28. 58
  29. #ff0000
  30. green
  31. F
  32. white
  33. blue
  34. green
  35. blue
  36. 230
  37. 38
  38. #ffffff
  39. 10
  40. 174

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