← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 185 · 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) cyan (b) bright green (c) blue (d) magenta
  2. 2.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) blue (c) cyan (d) yellow
  4. 4.🌈 Which colour of light is strongest in rgb(100, 22, 192)? (a) green (b) blue (c) red
  5. 5.🌈 In #004200 the green part is the hex number 42. What is it as a normal number?
  6. 6.🌈 Which colour of light is strongest in rgb(139, 110, 239)? (a) green (b) red (c) blue
  7. 7.🌈 Which colour of light is strongest in rgb(217, 140, 46)? (a) green (b) red (c) blue
  8. 8.🌈 Which colour of light is strongest in rgb(212, 134, 34)? (a) blue (b) green (c) red
  9. 9.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) cyan (d) red
  10. 10.🌈 Which hex code is black? (a) #00ff00 (b) #ff0000 (c) #0000ff (d) #000000
  11. 11.🌈 Which colour of light is strongest in rgb(4, 158, 117)? (a) blue (b) green (c) red
  12. 12.🌈 In #000088 the blue part is the hex number 88. What is it as a normal number?
  13. 13.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  15. 15.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
  16. 16.🌈 Which hex code is blue? (a) #ffffff (b) #000000 (c) #0000ff (d) #00ffff
  17. 17.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) yellow (c) magenta (d) cyan
  18. 18.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) red (c) magenta (d) bright green
  19. 19.🌈 Which colour of light is strongest in rgb(162, 84, 56)? (a) green (b) red (c) blue
  20. 20.🌈 In #000060 the blue part is the hex number 60. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(209, 70, 52)? (a) blue (b) red (c) green
  22. 22.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  23. 23.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) red (d) blue
  24. 24.🌈 Which hex code is cyan? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #00ffff
  25. 25.🌈 Which colour is #ffff00? (a) red (b) blue (c) yellow (d) cyan
  26. 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) yellow (c) magenta (d) bright green
  28. 28.🌈 Which colour is #00ffff? (a) blue (b) magenta (c) bright green (d) cyan
  29. 29.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(166, 54, 75)? (a) blue (b) red (c) green
  31. 31.🌈 Which colour of light is strongest in rgb(169, 33, 26)? (a) blue (b) red (c) green
  32. 32.🌈 In #710000 the red part is the hex number 71. What is it as a normal number?
  33. 33.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #00ff00 (d) #0000ff
  34. 34.🌈 In #0000d6 the blue part is the hex number d6. What is it as a normal number?
  35. 35.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  36. 36.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
  37. 37.🌈 Which hex code is yellow? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
  38. 38.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  39. 39.🌈 Which colour of light is strongest in rgb(12, 47, 162)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(253, 77, 31)? (a) red (b) green (c) blue

Answer key

  1. blue
  2. 242
  3. cyan
  4. blue
  5. 66
  6. blue
  7. red
  8. red
  9. red
  10. #000000
  11. green
  12. 136
  13. 51
  14. 3
  15. 18
  16. #0000ff
  17. yellow
  18. magenta
  19. red
  20. 96
  21. red
  22. red
  23. magenta
  24. #00ffff
  25. yellow
  26. F
  27. bright green
  28. cyan
  29. 75
  30. red
  31. red
  32. 113
  33. #ffffff
  34. 214
  35. blue
  36. 33
  37. #ffff00
  38. 255
  39. blue
  40. red

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