← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 36 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  2. 2.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #00ffff (d) #ff0000
  3. 3.🌈 Which colour of light is strongest in rgb(242, 6, 114)? (a) green (b) blue (c) red
  4. 4.🌈 Which colour of light is strongest in rgb(98, 223, 34)? (a) green (b) blue (c) red
  5. 5.🌈 Which colour is #000000? (a) black (b) red (c) yellow (d) blue
  6. 6.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #0000ff
  7. 7.🌈 Which colour is #00ff00? (a) blue (b) yellow (c) white (d) bright green
  8. 8.🌈 Which colour of light is strongest in rgb(22, 70, 175)? (a) red (b) blue (c) green
  9. 9.🌈 Which hex code is magenta? (a) #ff0000 (b) #ffff00 (c) #ff00ff (d) #000000
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) black (c) blue (d) white
  11. 11.🌈 In #000049 the blue part is the hex number 49. What is it as a normal number?
  12. 12.🌈 In #000076 the blue part is the hex number 76. What is it as a normal number?
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  14. 14.🌈 Which colour is #00ffff? (a) bright green (b) blue (c) cyan (d) red
  15. 15.🌈 Which colour of light is strongest in rgb(192, 20, 103)? (a) green (b) red (c) blue
  16. 16.🌈 Which colour of light is strongest in rgb(26, 12, 240)? (a) blue (b) green (c) red
  17. 17.🌈 Which hex code is black? (a) #ffff00 (b) #ffffff (c) #000000 (d) #ff0000
  18. 18.🌈 Which colour is #0000ff? (a) bright green (b) white (c) blue (d) magenta
  19. 19.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  20. 20.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) red
  21. 21.🌈 Which hex code is red? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #ffffff
  22. 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  23. 23.🌈 In #003100 the green part is the hex number 31. What is it as a normal number?
  24. 24.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #ff00ff
  25. 25.🌈 In #df0000 the red part is the hex number df. What is it as a normal number?
  26. 26.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
  27. 27.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  28. 28.🌈 Which hex code is blue? (a) #00ffff (b) #00ff00 (c) #0000ff (d) #ff0000
  29. 29.🌈 Which colour of light is strongest in rgb(184, 83, 10)? (a) red (b) blue (c) green
  30. 30.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) cyan (c) yellow (d) bright green
  31. 31.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(211, 1, 40)? (a) green (b) blue (c) red
  33. 33.🌈 In #0000c6 the blue part is the hex number c6. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(219, 140, 134)? (a) green (b) blue (c) red
  35. 35.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) cyan (c) bright green (d) black
  36. 36.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) magenta (d) blue
  37. 37.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) black (c) blue (d) white
  38. 38.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) white (c) magenta (d) blue
  39. 39.🌈 Which hex code is cyan? (a) #000000 (b) #0000ff (c) #00ffff (d) #ffffff
  40. 40.🌈 In #003e00 the green part is the hex number 3e. What is it as a normal number?

Answer key

  1. 255
  2. #00ff00
  3. red
  4. green
  5. black
  6. #ffffff
  7. bright green
  8. blue
  9. #ff00ff
  10. white
  11. 73
  12. 118
  13. red
  14. cyan
  15. red
  16. blue
  17. #000000
  18. blue
  19. blue
  20. yellow
  21. #ff0000
  22. 3
  23. 49
  24. #ffff00
  25. 223
  26. 147
  27. F
  28. #0000ff
  29. red
  30. cyan
  31. 67
  32. red
  33. 198
  34. red
  35. bright green
  36. red
  37. blue
  38. magenta
  39. #00ffff
  40. 62

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