← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 245 · 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) magenta (b) cyan (c) bright green (d) black
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  3. 3.🌈 In #00c000 the green part is the hex number c0. What is it as a normal number?
  4. 4.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) black (d) magenta
  5. 5.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #ffffff
  6. 6.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) black (c) white (d) yellow
  7. 7.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  8. 8.🌈 Which colour of light is strongest in rgb(204, 10, 0)? (a) green (b) red (c) blue
  9. 9.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
  10. 10.🌈 Which colour is #ffffff? (a) blue (b) white (c) bright green (d) magenta
  11. 11.🌈 Which colour of light is strongest in rgb(102, 185, 129)? (a) red (b) green (c) blue
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  13. 13.🌈 Which colour of light is strongest in rgb(192, 6, 86)? (a) red (b) blue (c) green
  14. 14.🌈 In #0000fe the blue part is the hex number fe. What is it as a normal number?
  15. 15.🌈 Which hex code is white? (a) #00ffff (b) #ff0000 (c) #000000 (d) #ffffff
  16. 16.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
  17. 17.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) bright green (d) yellow
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) magenta (c) red (d) bright green
  19. 19.🌈 Which colour is #00ff00? (a) red (b) black (c) yellow (d) bright green
  20. 20.🌈 Which colour of light is strongest in rgb(51, 132, 177)? (a) red (b) green (c) blue
  21. 21.🌈 Which hex code is black? (a) #ff0000 (b) #0000ff (c) #000000 (d) #ffffff
  22. 22.🌈 Which colour of light is strongest in rgb(231, 128, 0)? (a) red (b) blue (c) green
  23. 23.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) blue (d) magenta
  24. 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  25. 25.🌈 Which colour of light is strongest in rgb(102, 140, 160)? (a) green (b) red (c) blue
  26. 26.🌈 Which hex code is red? (a) #ffff00 (b) #0000ff (c) #ff0000 (d) #ff00ff
  27. 27.🌈 Which colour of light is strongest in rgb(194, 14, 30)? (a) green (b) blue (c) red
  28. 28.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  29. 29.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) cyan (c) blue (d) white
  30. 30.🌈 In #00005e the blue part is the hex number 5e. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(219, 61, 74)? (a) red (b) green (c) blue
  32. 32.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) cyan (c) bright green (d) white
  33. 33.🌈 Which colour of light is strongest in rgb(184, 111, 109)? (a) green (b) blue (c) red
  34. 34.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
  35. 35.🌈 Which colour is #ff0000? (a) yellow (b) blue (c) red (d) bright green
  36. 36.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
  37. 37.🌈 In #0000b7 the blue part is the hex number b7. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(11, 244, 115)? (a) blue (b) red (c) green
  39. 39.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) magenta (d) white
  40. 40.🌈 Which colour of light is strongest in rgb(119, 173, 38)? (a) blue (b) green (c) red

Answer key

  1. black
  2. 255
  3. 192
  4. yellow
  5. #00ffff
  6. yellow
  7. blue
  8. red
  9. 240
  10. white
  11. green
  12. F
  13. red
  14. 254
  15. #ffffff
  16. 155
  17. black
  18. red
  19. bright green
  20. blue
  21. #000000
  22. red
  23. cyan
  24. 3
  25. blue
  26. #ff0000
  27. red
  28. red
  29. blue
  30. 94
  31. red
  32. bright green
  33. red
  34. 241
  35. red
  36. 169
  37. 183
  38. green
  39. cyan
  40. green

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