← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 166 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  2. 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #000000
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) yellow (d) black
  4. 4.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) cyan (d) magenta
  5. 5.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) magenta (d) cyan
  6. 6.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #ffff00 (d) #00ff00
  7. 7.🌈 Which colour is #00ff00? (a) yellow (b) cyan (c) white (d) bright green
  8. 8.🌈 In #000038 the blue part is the hex number 38. What is it as a normal number?
  9. 9.🌈 In #620000 the red part is the hex number 62. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) black (d) blue
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  12. 12.🌈 In #008a00 the green part is the hex number 8a. What is it as a normal number?
  13. 13.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
  14. 14.🌈 Which colour of light is strongest in rgb(70, 81, 234)? (a) red (b) blue (c) green
  15. 15.🌈 Which colour of light is strongest in rgb(89, 253, 6)? (a) blue (b) red (c) green
  16. 16.🌈 Which colour of light is strongest in rgb(103, 38, 249)? (a) green (b) blue (c) red
  17. 17.🌈 In #f00000 the red part is the hex number f0. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(172, 40, 32)? (a) blue (b) red (c) green
  19. 19.🌈 Which colour of light is strongest in rgb(184, 129, 54)? (a) red (b) green (c) blue
  20. 20.🌈 Which colour is #ffffff? (a) yellow (b) white (c) black (d) blue
  21. 21.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) magenta (c) yellow (d) red
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  23. 23.🌈 Which colour is #ffff00? (a) white (b) bright green (c) blue (d) yellow
  24. 24.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
  25. 25.🌈 Which colour is #000000? (a) blue (b) red (c) black (d) white
  26. 26.🌈 Which colour of light is strongest in rgb(45, 158, 107)? (a) red (b) green (c) blue
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  28. 28.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
  29. 29.🌈 Which colour is #ff0000? (a) red (b) black (c) bright green (d) blue
  30. 30.🌈 Which colour of light is strongest in rgb(132, 166, 2)? (a) red (b) green (c) blue
  31. 31.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) bright green (c) white (d) black
  32. 32.🌈 Which hex code is blue? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #00ffff
  33. 33.🌈 In #6c0000 the red part is the hex number 6c. What is it as a normal number?
  34. 34.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #ff00ff
  35. 35.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ff0000 (d) #ffff00
  36. 36.🌈 Which hex code is cyan? (a) #ffffff (b) #0000ff (c) #00ffff (d) #000000
  37. 37.🌈 In #0000c5 the blue part is the hex number c5. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(2, 11, 225)? (a) red (b) green (c) blue
  39. 39.🌈 In #b40000 the red part is the hex number b4. What is it as a normal number?
  40. 40.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #00ffff

Answer key

  1. F
  2. #ff00ff
  3. cyan
  4. blue
  5. magenta
  6. #00ff00
  7. bright green
  8. 56
  9. 98
  10. magenta
  11. red
  12. 138
  13. blue
  14. blue
  15. green
  16. blue
  17. 240
  18. red
  19. red
  20. white
  21. red
  22. 255
  23. yellow
  24. 99
  25. black
  26. green
  27. 3
  28. 41
  29. red
  30. green
  31. white
  32. #0000ff
  33. 108
  34. #ffffff
  35. #000000
  36. #00ffff
  37. 197
  38. blue
  39. 180
  40. #ffff00

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