← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 363 · 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 #008400 the green part is the hex number 84. What is it as a normal number?
  2. 2.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #000000
  3. 3.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) magenta (c) bright green (d) yellow
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  5. 5.🌈 Which colour of light is strongest in rgb(161, 99, 90)? (a) green (b) blue (c) red
  6. 6.🌈 In #00004a the blue part is the hex number 4a. What is it as a normal number?
  7. 7.🌈 Which colour of light is strongest in rgb(180, 100, 33)? (a) green (b) blue (c) red
  8. 8.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  9. 9.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) bright green (d) white
  10. 10.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) yellow (d) red
  11. 11.🌈 In #001400 the green part is the hex number 14. What is it as a normal number?
  12. 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  13. 13.🌈 Which colour of light is strongest in rgb(12, 67, 182)? (a) red (b) green (c) blue
  14. 14.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) black (c) cyan (d) magenta
  15. 15.🌈 Which hex code is black? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #000000
  16. 16.🌈 Which colour is #00ff00? (a) white (b) bright green (c) red (d) blue
  17. 17.🌈 In #00ed00 the green part is the hex number ed. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(101, 11, 248)? (a) red (b) green (c) blue
  19. 19.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  20. 20.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  21. 21.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) bright green (d) yellow
  22. 22.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) cyan (d) blue
  23. 23.🌈 Which colour of light is strongest in rgb(220, 5, 28)? (a) blue (b) green (c) red
  24. 24.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) white (c) black (d) cyan
  25. 25.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #000000 (d) #ff0000
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) white (c) red (d) bright green
  27. 27.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) magenta (d) white
  28. 28.🌈 Which colour of light is strongest in rgb(32, 3, 155)? (a) red (b) blue (c) green
  29. 29.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(224, 18, 23)? (a) red (b) green (c) blue
  31. 31.🌈 Which colour of light is strongest in rgb(137, 151, 29)? (a) green (b) red (c) blue
  32. 32.🌈 Which colour of light is strongest in rgb(224, 80, 25)? (a) red (b) blue (c) green
  33. 33.🌈 Which colour is #0000ff? (a) white (b) magenta (c) blue (d) yellow
  34. 34.🌈 Which colour is #00ffff? (a) red (b) magenta (c) yellow (d) cyan
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) blue (d) white
  36. 36.🌈 Which colour of light is strongest in rgb(20, 174, 41)? (a) blue (b) red (c) green
  37. 37.🌈 Which colour of light is strongest in rgb(221, 100, 5)? (a) red (b) green (c) blue
  38. 38.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #000000
  39. 39.🌈 Which colour of light is strongest in rgb(203, 44, 50)? (a) blue (b) green (c) red
  40. 40.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?

Answer key

  1. 132
  2. #ff00ff
  3. yellow
  4. red
  5. red
  6. 74
  7. red
  8. 255
  9. bright green
  10. red
  11. 20
  12. 3
  13. blue
  14. cyan
  15. #000000
  16. bright green
  17. 237
  18. blue
  19. blue
  20. F
  21. white
  22. blue
  23. red
  24. black
  25. #0000ff
  26. magenta
  27. yellow
  28. blue
  29. 131
  30. red
  31. green
  32. red
  33. blue
  34. cyan
  35. red
  36. green
  37. red
  38. #ffff00
  39. red
  40. 195

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