← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 112 · 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 hex code is red? (a) #ff00ff (b) #0000ff (c) #ff0000 (d) #ffffff
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) yellow (c) black (d) red
  3. 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  4. 4.🌈 Which colour of light is strongest in rgb(102, 167, 4)? (a) blue (b) green (c) red
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  7. 7.🌈 Which colour of light is strongest in rgb(29, 167, 37)? (a) green (b) red (c) blue
  8. 8.🌈 Which colour of light is strongest in rgb(26, 255, 80)? (a) green (b) blue (c) red
  9. 9.🌈 Which colour is #000000? (a) cyan (b) blue (c) black (d) red
  10. 10.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
  11. 11.🌈 Which hex code is black? (a) #00ffff (b) #0000ff (c) #ffffff (d) #000000
  12. 12.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) cyan (c) bright green (d) white
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  14. 14.🌈 In #6d0000 the red part is the hex number 6d. What is it as a normal number?
  15. 15.🌈 In #0000aa the blue part is the hex number aa. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) magenta (c) red (d) black
  17. 17.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #ffffff
  18. 18.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
  19. 19.🌈 Which colour is #ff00ff? (a) bright green (b) red (c) white (d) magenta
  20. 20.🌈 Which colour of light is strongest in rgb(215, 37, 52)? (a) red (b) blue (c) green
  21. 21.🌈 Which hex code is cyan? (a) #ffffff (b) #00ffff (c) #ff00ff (d) #ff0000
  22. 22.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  23. 23.🌈 In #720000 the red part is the hex number 72. What is it as a normal number?
  24. 24.🌈 Which colour is #ffffff? (a) yellow (b) white (c) cyan (d) bright green
  25. 25.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) yellow (d) cyan
  26. 26.🌈 Which colour of light is strongest in rgb(203, 79, 75)? (a) blue (b) red (c) green
  27. 27.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) magenta (c) blue (d) white
  28. 28.🌈 Which colour of light is strongest in rgb(55, 52, 170)? (a) red (b) green (c) blue
  29. 29.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) yellow (c) red (d) magenta
  30. 30.🌈 In #00a700 the green part is the hex number a7. What is it as a normal number?
  31. 31.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(114, 186, 22)? (a) red (b) blue (c) green
  33. 33.🌈 Which hex code is white? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #ffffff
  34. 34.🌈 Which hex code is yellow? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffff00
  35. 35.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ffff00
  36. 36.🌈 Which colour of light is strongest in rgb(211, 91, 103)? (a) blue (b) red (c) green
  37. 37.🌈 Which colour is #00ff00? (a) red (b) magenta (c) bright green (d) yellow
  38. 38.🌈 Which colour is #0000ff? (a) black (b) red (c) blue (d) bright green
  39. 39.🌈 Which hex code is blue? (a) #0000ff (b) #ffff00 (c) #00ff00 (d) #000000
  40. 40.🌈 Which colour of light is strongest in rgb(39, 51, 225)? (a) green (b) blue (c) red

Answer key

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

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