← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 313 · 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) blue (c) black (d) red
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  3. 3.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) blue (d) red
  4. 4.🌈 Which colour of light is strongest in rgb(160, 105, 90)? (a) green (b) blue (c) red
  5. 5.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) red (d) white
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  7. 7.🌈 Which colour is #000000? (a) red (b) white (c) magenta (d) black
  8. 8.🌈 Which colour of light is strongest in rgb(12, 110, 158)? (a) red (b) blue (c) green
  9. 9.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #0000ff (d) #00ff00
  10. 10.🌈 Which colour is #ffff00? (a) white (b) yellow (c) magenta (d) blue
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  12. 12.🌈 In #0000eb the blue part is the hex number eb. What is it as a normal number?
  13. 13.🌈 Which colour is #00ff00? (a) bright green (b) white (c) cyan (d) red
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  15. 15.🌈 Which colour is #00ffff? (a) red (b) magenta (c) cyan (d) bright green
  16. 16.🌈 In #000a00 the green part is the hex number 0a. What is it as a normal number?
  17. 17.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #00ff00 (d) #ff0000
  18. 18.🌈 Which colour of light is strongest in rgb(13, 234, 115)? (a) blue (b) red (c) green
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) black (d) white
  20. 20.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) bright green (c) red (d) magenta
  21. 21.🌈 Which colour of light is strongest in rgb(253, 46, 26)? (a) green (b) red (c) blue
  22. 22.🌈 Which colour is #ff0000? (a) red (b) white (c) cyan (d) magenta
  23. 23.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #000000 (d) #00ff00
  24. 24.🌈 Which colour of light is strongest in rgb(253, 121, 89)? (a) red (b) blue (c) green
  25. 25.🌈 In #4c0000 the red part is the hex number 4c. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(223, 113, 28)? (a) red (b) blue (c) green
  27. 27.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #000000 (d) #ffffff
  28. 28.🌈 In #00bc00 the green part is the hex number bc. What is it as a normal number?
  29. 29.🌈 In #5b0000 the red part is the hex number 5b. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) bright green (c) white (d) yellow
  31. 31.🌈 Which colour of light is strongest in rgb(245, 18, 46)? (a) green (b) red (c) blue
  32. 32.🌈 Which colour of light is strongest in rgb(109, 168, 137)? (a) red (b) blue (c) green
  33. 33.🌈 Which colour of light is strongest in rgb(156, 53, 84)? (a) green (b) red (c) blue
  34. 34.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) magenta (d) red
  35. 35.🌈 Which colour of light is strongest in rgb(203, 102, 54)? (a) blue (b) green (c) red
  36. 36.🌈 In #ba0000 the red part is the hex number ba. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(40, 11, 198)? (a) red (b) green (c) blue
  38. 38.🌈 Which colour of light is strongest in rgb(112, 103, 247)? (a) blue (b) green (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(178, 15, 132)? (a) green (b) red (c) blue
  40. 40.🌈 In #ad0000 the red part is the hex number ad. What is it as a normal number?

Answer key

  1. red
  2. 255
  3. magenta
  4. red
  5. blue
  6. 3
  7. black
  8. blue
  9. #000000
  10. yellow
  11. F
  12. 235
  13. bright green
  14. blue
  15. cyan
  16. 10
  17. #ff00ff
  18. green
  19. black
  20. red
  21. red
  22. red
  23. #ffffff
  24. red
  25. 76
  26. red
  27. #00ff00
  28. 188
  29. 91
  30. yellow
  31. red
  32. green
  33. red
  34. blue
  35. red
  36. 186
  37. blue
  38. blue
  39. red
  40. 173

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