← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 73 · 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 #ff0000? (a) red (b) blue (c) cyan (d) magenta
  2. 2.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
  3. 3.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ff0000
  4. 4.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) blue (c) yellow (d) magenta
  5. 5.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) red (d) cyan
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  7. 7.🌈 Which hex code is white? (a) #ffff00 (b) #00ff00 (c) #ffffff (d) #ff00ff
  8. 8.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
  9. 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
  10. 10.🌈 Which colour of light is strongest in rgb(168, 123, 108)? (a) blue (b) red (c) green
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  12. 12.🌈 Which colour of light is strongest in rgb(224, 87, 68)? (a) blue (b) green (c) red
  13. 13.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #00ffff
  14. 14.🌈 In #950000 the red part is the hex number 95. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) yellow (c) cyan (d) blue
  16. 16.🌈 Which colour is #000000? (a) blue (b) magenta (c) black (d) cyan
  17. 17.🌈 Which colour is #00ff00? (a) bright green (b) white (c) magenta (d) blue
  18. 18.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) magenta (d) bright green
  19. 19.🌈 Which colour is #ffff00? (a) red (b) magenta (c) black (d) yellow
  20. 20.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  21. 21.🌈 In #00e100 the green part is the hex number e1. What is it as a normal number?
  22. 22.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  23. 23.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) magenta (d) blue
  24. 24.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) white (c) red (d) bright green
  25. 25.🌈 Which colour of light is strongest in rgb(124, 121, 186)? (a) green (b) red (c) blue
  26. 26.🌈 Which colour of light is strongest in rgb(128, 241, 77)? (a) blue (b) green (c) red
  27. 27.🌈 Which colour is #00ffff? (a) red (b) cyan (c) yellow (d) blue
  28. 28.🌈 Which colour of light is strongest in rgb(35, 26, 227)? (a) green (b) red (c) blue
  29. 29.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff0000
  30. 30.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #00ff00 (d) #00ffff
  31. 31.🌈 In #440000 the red part is the hex number 44. What is it as a normal number?
  32. 32.🌈 Which hex code is blue? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #00ffff
  33. 33.🌈 Which colour of light is strongest in rgb(59, 225, 6)? (a) green (b) blue (c) red
  34. 34.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(197, 52, 39)? (a) red (b) blue (c) green
  36. 36.🌈 In #7d0000 the red part is the hex number 7d. What is it as a normal number?
  37. 37.🌈 In #009b00 the green part is the hex number 9b. What is it as a normal number?
  38. 38.🌈 Which colour is #0000ff? (a) blue (b) yellow (c) white (d) black
  39. 39.🌈 Which colour is #ffffff? (a) blue (b) cyan (c) magenta (d) white
  40. 40.🌈 Which colour of light is strongest in rgb(186, 85, 21)? (a) green (b) blue (c) red

Answer key

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

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