← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 368 · 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(255, 0, 255)? (a) blue (b) white (c) yellow (d) magenta
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) red (d) cyan
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  4. 4.🌈 Which colour is #000000? (a) white (b) bright green (c) black (d) cyan
  5. 5.🌈 Which colour of light is strongest in rgb(84, 37, 247)? (a) blue (b) red (c) green
  6. 6.🌈 In #00db00 the green part is the hex number db. What is it as a normal number?
  7. 7.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #00ffff (d) #ffff00
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
  9. 9.🌈 Which colour is #ff00ff? (a) yellow (b) magenta (c) bright green (d) white
  10. 10.🌈 Which hex code is blue? (a) #00ff00 (b) #ff0000 (c) #ff00ff (d) #0000ff
  11. 11.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
  12. 12.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ffff00 (d) #00ffff
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
  14. 14.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
  15. 15.🌈 Which colour of light is strongest in rgb(111, 118, 242)? (a) red (b) green (c) blue
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  17. 17.🌈 Which hex code is cyan? (a) #00ffff (b) #00ff00 (c) #000000 (d) #ff00ff
  18. 18.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #00ffff
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) white (c) black (d) red
  20. 20.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  21. 21.🌈 Which colour of light is strongest in rgb(250, 92, 35)? (a) blue (b) red (c) green
  22. 22.🌈 Which colour is #00ffff? (a) black (b) cyan (c) red (d) blue
  23. 23.🌈 In #000095 the blue part is the hex number 95. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(129, 239, 0)? (a) blue (b) green (c) red
  25. 25.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) magenta (d) cyan
  26. 26.🌈 Which colour is #0000ff? (a) white (b) black (c) blue (d) bright green
  27. 27.🌈 Which colour of light is strongest in rgb(100, 6, 158)? (a) red (b) green (c) blue
  28. 28.🌈 In #005500 the green part is the hex number 55. What is it as a normal number?
  29. 29.🌈 Which colour is #00ff00? (a) bright green (b) cyan (c) red (d) blue
  30. 30.🌈 In #0000a8 the blue part is the hex number a8. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(192, 41, 45)? (a) red (b) blue (c) green
  32. 32.🌈 In #fc0000 the red part is the hex number fc. What is it as a normal number?
  33. 33.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ffff00
  34. 34.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
  35. 35.🌈 Which colour is #ffff00? (a) red (b) black (c) blue (d) yellow
  36. 36.🌈 Which colour of light is strongest in rgb(102, 16, 154)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(190, 39, 87)? (a) blue (b) green (c) red
  38. 38.🌈 In #000053 the blue part is the hex number 53. What is it as a normal number?
  39. 39.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #00ff00
  40. 40.🌈 Which colour of light is strongest in rgb(167, 38, 79)? (a) green (b) red (c) blue

Answer key

  1. magenta
  2. bright green
  3. 255
  4. black
  5. blue
  6. 219
  7. #ff00ff
  8. red
  9. magenta
  10. #0000ff
  11. 9
  12. #00ff00
  13. F
  14. 196
  15. blue
  16. blue
  17. #00ffff
  18. #ffffff
  19. black
  20. 3
  21. red
  22. cyan
  23. 149
  24. green
  25. white
  26. blue
  27. blue
  28. 85
  29. bright green
  30. 168
  31. red
  32. 252
  33. #000000
  34. 34
  35. yellow
  36. blue
  37. red
  38. 83
  39. #ff0000
  40. red

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