← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 10 · 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) cyan (b) yellow (c) red (d) magenta
  2. 2.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #00ffff
  3. 3.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #00ffff
  4. 4.🌈 Which colour is #00ffff? (a) bright green (b) blue (c) red (d) cyan
  5. 5.🌈 Which colour of light is strongest in rgb(15, 100, 246)? (a) blue (b) green (c) red
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  7. 7.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
  8. 8.🌈 In #005600 the green part is the hex number 56. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) cyan (d) yellow
  10. 10.🌈 Which colour of light is strongest in rgb(33, 33, 175)? (a) blue (b) green (c) red
  11. 11.🌈 Which colour of light is strongest in rgb(252, 67, 68)? (a) blue (b) red (c) green
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  14. 14.🌈 Which colour of light is strongest in rgb(186, 64, 22)? (a) blue (b) green (c) red
  15. 15.🌈 Which colour is #ff0000? (a) magenta (b) red (c) cyan (d) bright green
  16. 16.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) blue (d) magenta
  17. 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  18. 18.🌈 Which colour of light is strongest in rgb(10, 241, 107)? (a) green (b) red (c) blue
  19. 19.🌈 Which colour is #0000ff? (a) cyan (b) magenta (c) yellow (d) blue
  20. 20.🌈 Which colour of light is strongest in rgb(213, 35, 22)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is #000000? (a) white (b) black (c) bright green (d) yellow
  22. 22.🌈 Which hex code is blue? (a) #ff0000 (b) #0000ff (c) #000000 (d) #00ffff
  23. 23.🌈 Which colour of light is strongest in rgb(40, 189, 13)? (a) red (b) green (c) blue
  24. 24.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  25. 25.🌈 In #00fb00 the green part is the hex number fb. What is it as a normal number?
  26. 26.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  27. 27.🌈 In #00a400 the green part is the hex number a4. What is it as a normal number?
  28. 28.🌈 In #001a00 the green part is the hex number 1a. What is it as a normal number?
  29. 29.🌈 Which colour is #ffffff? (a) cyan (b) bright green (c) white (d) yellow
  30. 30.🌈 Which colour of light is strongest in rgb(155, 62, 9)? (a) blue (b) green (c) red
  31. 31.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) cyan (d) yellow
  32. 32.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) blue (c) bright green (d) cyan
  33. 33.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) yellow (d) magenta
  34. 34.🌈 Which hex code is white? (a) #0000ff (b) #ff00ff (c) #ffffff (d) #ff0000
  35. 35.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) red (c) magenta (d) white
  36. 36.🌈 In #460000 the red part is the hex number 46. What is it as a normal number?
  37. 37.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #0000ff (d) #00ffff
  38. 38.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #00ffff
  39. 39.🌈 Which colour of light is strongest in rgb(102, 214, 51)? (a) blue (b) red (c) green
  40. 40.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?

Answer key

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

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