← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 238 · 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(255, 0, 0)? (a) red (b) white (c) blue (d) cyan
  2. 2.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  4. 4.🌈 Which colour is #ffff00? (a) red (b) cyan (c) white (d) yellow
  5. 5.🌈 Which hex code is bright green? (a) #000000 (b) #ff0000 (c) #00ffff (d) #00ff00
  6. 6.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) white (d) red
  7. 7.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #ff0000 (d) #00ffff
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) yellow (d) white
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  10. 10.🌈 In #000071 the blue part is the hex number 71. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) cyan (c) black (d) bright green
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  13. 13.🌈 In #00f500 the green part is the hex number f5. What is it as a normal number?
  14. 14.🌈 Which colour is #ffffff? (a) magenta (b) cyan (c) white (d) bright green
  15. 15.🌈 Which colour of light is strongest in rgb(166, 49, 105)? (a) green (b) blue (c) red
  16. 16.🌈 Which colour is #000000? (a) red (b) cyan (c) black (d) bright green
  17. 17.🌈 Which colour of light is strongest in rgb(39, 185, 125)? (a) red (b) green (c) blue
  18. 18.🌈 In #980000 the red part is the hex number 98. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) black (d) white
  20. 20.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) white (d) blue
  21. 21.🌈 Which colour is #ff00ff? (a) red (b) black (c) magenta (d) blue
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  23. 23.🌈 In #007a00 the green part is the hex number 7a. What is it as a normal number?
  24. 24.🌈 Which hex code is cyan? (a) #ffffff (b) #ff0000 (c) #00ffff (d) #00ff00
  25. 25.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) yellow (d) red
  26. 26.🌈 Which colour is #ff0000? (a) black (b) magenta (c) blue (d) red
  27. 27.🌈 In #000055 the blue part is the hex number 55. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(71, 192, 101)? (a) red (b) green (c) blue
  29. 29.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?
  30. 30.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
  31. 31.🌈 In #bb0000 the red part is the hex number bb. What is it as a normal number?
  32. 32.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(107, 53, 168)? (a) red (b) blue (c) green
  34. 34.🌈 Which colour of light is strongest in rgb(63, 38, 204)? (a) green (b) blue (c) red
  35. 35.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #ff0000
  36. 36.🌈 Which colour of light is strongest in rgb(130, 187, 49)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour is #00ff00? (a) magenta (b) bright green (c) white (d) black
  38. 38.🌈 In #0000f7 the blue part is the hex number f7. What is it as a normal number?
  39. 39.🌈 Which colour is #0000ff? (a) red (b) blue (c) cyan (d) white
  40. 40.🌈 Which colour of light is strongest in rgb(27, 218, 125)? (a) blue (b) red (c) green

Answer key

  1. red
  2. 56
  3. red
  4. yellow
  5. #00ff00
  6. yellow
  7. #ff00ff
  8. cyan
  9. blue
  10. 113
  11. bright green
  12. F
  13. 245
  14. white
  15. red
  16. black
  17. green
  18. 152
  19. black
  20. blue
  21. magenta
  22. 255
  23. 122
  24. #00ffff
  25. cyan
  26. red
  27. 85
  28. green
  29. 151
  30. 58
  31. 187
  32. 242
  33. blue
  34. blue
  35. #ff0000
  36. green
  37. bright green
  38. 247
  39. blue
  40. green

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