← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 239 · 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(0, 0, 255)? (a) blue (b) magenta (c) white (d) red
  2. 2.🌈 In #7c0000 the red part is the hex number 7c. What is it as a normal number?
  3. 3.🌈 Which colour of light is strongest in rgb(249, 77, 6)? (a) red (b) green (c) blue
  4. 4.🌈 Which colour of light is strongest in rgb(40, 122, 190)? (a) red (b) blue (c) green
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  6. 6.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) cyan (d) bright green
  7. 7.🌈 Which colour of light is strongest in rgb(225, 17, 41)? (a) green (b) blue (c) red
  8. 8.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) blue (c) magenta (d) red
  9. 9.🌈 Which colour is #ff0000? (a) magenta (b) white (c) red (d) cyan
  10. 10.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #ffff00
  11. 11.🌈 In #b40000 the red part is the hex number b4. What is it as a normal number?
  12. 12.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) blue (d) black
  13. 13.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) red (d) bright green
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  17. 17.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
  18. 18.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #ffffff (d) #00ffff
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) red (d) white
  20. 20.🌈 Which colour of light is strongest in rgb(84, 14, 179)? (a) red (b) green (c) blue
  21. 21.🌈 Which colour is #000000? (a) black (b) red (c) magenta (d) blue
  22. 22.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) bright green (d) blue
  24. 24.🌈 Which colour of light is strongest in rgb(4, 95, 151)? (a) red (b) green (c) blue
  25. 25.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  26. 26.🌈 In #ec0000 the red part is the hex number ec. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(66, 6, 188)? (a) red (b) blue (c) green
  28. 28.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) yellow (d) white
  29. 29.🌈 Which colour of light is strongest in rgb(21, 154, 0)? (a) blue (b) green (c) red
  30. 30.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) red (c) yellow (d) bright green
  31. 31.🌈 In #0000cc the blue part is the hex number cc. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(52, 162, 132)? (a) green (b) red (c) blue
  33. 33.🌈 In #480000 the red part is the hex number 48. What is it as a normal number?
  34. 34.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #00ff00
  35. 35.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) white (d) red
  36. 36.🌈 Which colour is #ffffff? (a) black (b) magenta (c) white (d) blue
  37. 37.🌈 Which colour of light is strongest in rgb(12, 180, 38)? (a) blue (b) red (c) green
  38. 38.🌈 In #f50000 the red part is the hex number f5. What is it as a normal number?
  39. 39.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  40. 40.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) red (d) bright green

Answer key

  1. blue
  2. 124
  3. red
  4. blue
  5. red
  6. magenta
  7. red
  8. magenta
  9. red
  10. #ff0000
  11. 180
  12. blue
  13. black
  14. blue
  15. 255
  16. 3
  17. 243
  18. #00ff00
  19. red
  20. blue
  21. black
  22. 27
  23. yellow
  24. blue
  25. 132
  26. 236
  27. blue
  28. white
  29. green
  30. bright green
  31. 204
  32. green
  33. 72
  34. #ff00ff
  35. cyan
  36. white
  37. green
  38. 245
  39. F
  40. cyan

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