← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 290 · 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 first two digits give? (a) green (b) red (c) black (d) blue
  2. 2.🌈 Which colour of light is strongest in rgb(32, 16, 189)? (a) green (b) red (c) blue
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  4. 4.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) red (c) cyan (d) blue
  5. 5.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) magenta (d) black
  6. 6.🌈 Which colour of light is strongest in rgb(222, 41, 92)? (a) green (b) blue (c) red
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  8. 8.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ffffff
  9. 9.🌈 Which hex code is blue? (a) #0000ff (b) #ff0000 (c) #ff00ff (d) #00ffff
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) blue (c) black (d) white
  11. 11.🌈 In #00b500 the green part is the hex number b5. What is it as a normal number?
  12. 12.🌈 In #00006c the blue part is the hex number 6c. What is it as a normal number?
  13. 13.🌈 Which hex code is bright green? (a) #ff00ff (b) #00ff00 (c) #ff0000 (d) #0000ff
  14. 14.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) bright green (c) yellow (d) black
  16. 16.🌈 Which colour of light is strongest in rgb(77, 155, 25)? (a) red (b) blue (c) green
  17. 17.🌈 Which colour is #000000? (a) red (b) black (c) yellow (d) bright green
  18. 18.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #ffffff
  19. 19.🌈 Which colour is #ff0000? (a) bright green (b) white (c) cyan (d) red
  20. 20.🌈 Which colour is #ffffff? (a) white (b) magenta (c) black (d) bright green
  21. 21.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) yellow (c) cyan (d) red
  22. 22.🌈 Which colour of light is strongest in rgb(122, 184, 19)? (a) green (b) blue (c) red
  23. 23.🌈 Which colour of light is strongest in rgb(172, 140, 7)? (a) blue (b) red (c) green
  24. 24.🌈 In #006700 the green part is the hex number 67. What is it as a normal number?
  25. 25.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  26. 26.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) bright green (d) red
  27. 27.🌈 Which colour is #00ffff? (a) white (b) cyan (c) black (d) magenta
  28. 28.🌈 In #e80000 the red part is the hex number e8. What is it as a normal number?
  29. 29.🌈 In #0000be the blue part is the hex number be. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(63, 209, 106)? (a) blue (b) green (c) red
  31. 31.🌈 In #dd0000 the red part is the hex number dd. What is it as a normal number?
  32. 32.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #0000ff
  33. 33.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) white (d) magenta
  34. 34.🌈 Which colour of light is strongest in rgb(0, 56, 216)? (a) red (b) blue (c) green
  35. 35.🌈 In #9d0000 the red part is the hex number 9d. What is it as a normal number?
  36. 36.🌈 In #001b00 the green part is the hex number 1b. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(29, 99, 180)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) yellow (d) magenta
  39. 39.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) bright green (c) magenta (d) cyan
  40. 40.🌈 In #00001c the blue part is the hex number 1c. What is it as a normal number?

Answer key

  1. red
  2. blue
  3. blue
  4. blue
  5. bright green
  6. red
  7. 255
  8. #00ffff
  9. #0000ff
  10. white
  11. 181
  12. 108
  13. #00ff00
  14. 3
  15. black
  16. green
  17. black
  18. #ff00ff
  19. red
  20. white
  21. cyan
  22. green
  23. red
  24. 103
  25. F
  26. red
  27. cyan
  28. 232
  29. 190
  30. green
  31. 221
  32. #000000
  33. blue
  34. blue
  35. 157
  36. 27
  37. blue
  38. bright green
  39. magenta
  40. 28

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