← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 42 · 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 #000000? (a) white (b) black (c) yellow (d) bright green
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  3. 3.🌈 Which colour is #0000ff? (a) black (b) blue (c) white (d) bright green
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  5. 5.🌈 Which colour is #00ffff? (a) blue (b) white (c) bright green (d) cyan
  6. 6.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #0000ff (d) #ffff00
  7. 7.🌈 Which hex code is cyan? (a) #000000 (b) #0000ff (c) #00ffff (d) #ff0000
  8. 8.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) bright green (d) red
  9. 9.🌈 In #dd0000 the red part is the hex number dd. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(246, 11, 13)? (a) red (b) green (c) blue
  11. 11.🌈 In #00bf00 the green part is the hex number bf. What is it as a normal number?
  12. 12.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(189, 40, 100)? (a) green (b) red (c) blue
  14. 14.🌈 In #b40000 the red part is the hex number b4. What is it as a normal number?
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  16. 16.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) yellow (d) bright green
  17. 17.🌈 Which colour of light is strongest in rgb(111, 76, 170)? (a) green (b) blue (c) red
  18. 18.🌈 Which colour of light is strongest in rgb(131, 11, 219)? (a) green (b) red (c) blue
  19. 19.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) magenta (c) blue (d) black
  20. 20.🌈 Which colour of light is strongest in rgb(161, 121, 109)? (a) green (b) red (c) blue
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  22. 22.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
  23. 23.🌈 Which colour of light is strongest in rgb(35, 17, 225)? (a) blue (b) green (c) red
  24. 24.🌈 Which colour of light is strongest in rgb(189, 62, 69)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) yellow (d) red
  26. 26.🌈 Which colour of light is strongest in rgb(174, 92, 70)? (a) green (b) red (c) blue
  27. 27.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
  28. 28.🌈 In #00009d the blue part is the hex number 9d. What is it as a normal number?
  29. 29.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) bright green (c) white (d) yellow
  31. 31.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) black (d) white
  32. 32.🌈 Which colour of light is strongest in rgb(9, 161, 31)? (a) green (b) blue (c) red
  33. 33.🌈 Which colour of light is strongest in rgb(48, 58, 153)? (a) red (b) green (c) blue
  34. 34.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) red (c) magenta (d) white
  35. 35.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #000000
  36. 36.🌈 In #430000 the red part is the hex number 43. What is it as a normal number?
  37. 37.🌈 Which colour is #ffffff? (a) blue (b) white (c) bright green (d) black
  38. 38.🌈 Which colour is #ffff00? (a) magenta (b) yellow (c) red (d) white
  39. 39.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #0000ff (d) #00ffff
  40. 40.🌈 Which colour is #00ff00? (a) red (b) magenta (c) bright green (d) blue

Answer key

  1. black
  2. 255
  3. blue
  4. blue
  5. cyan
  6. #ffff00
  7. #00ffff
  8. bright green
  9. 221
  10. red
  11. 191
  12. 77
  13. red
  14. 180
  15. F
  16. black
  17. blue
  18. blue
  19. blue
  20. red
  21. 3
  22. red
  23. blue
  24. red
  25. yellow
  26. red
  27. 211
  28. 157
  29. 188
  30. white
  31. magenta
  32. green
  33. blue
  34. magenta
  35. #00ff00
  36. 67
  37. white
  38. yellow
  39. #ffffff
  40. bright green

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