← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 367 · 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) white (b) red (c) blue (d) bright green
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) white (c) black (d) magenta
  3. 3.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
  4. 4.🌈 In #c60000 the red part is the hex number c6. What is it as a normal number?
  5. 5.🌈 Which colour is #00ff00? (a) bright green (b) black (c) red (d) yellow
  6. 6.🌈 Which colour of light is strongest in rgb(207, 103, 5)? (a) green (b) red (c) blue
  7. 7.🌈 Which colour is #00ffff? (a) red (b) magenta (c) blue (d) cyan
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  9. 9.🌈 Which colour of light is strongest in rgb(201, 130, 5)? (a) blue (b) red (c) green
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
  11. 11.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
  13. 13.🌈 Which colour is #0000ff? (a) black (b) bright green (c) blue (d) white
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) white (c) bright green (d) black
  15. 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  17. 17.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) cyan (d) yellow
  18. 18.🌈 Which hex code is yellow? (a) #000000 (b) #ff00ff (c) #ffff00 (d) #ffffff
  19. 19.🌈 In #e80000 the red part is the hex number e8. What is it as a normal number?
  20. 20.🌈 Which colour is #ff00ff? (a) bright green (b) blue (c) cyan (d) magenta
  21. 21.🌈 Which colour of light is strongest in rgb(211, 75, 6)? (a) blue (b) red (c) green
  22. 22.🌈 Which colour of light is strongest in rgb(29, 168, 16)? (a) green (b) blue (c) red
  23. 23.🌈 Which colour of light is strongest in rgb(166, 29, 92)? (a) red (b) green (c) blue
  24. 24.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
  25. 25.🌈 In #0000eb the blue part is the hex number eb. What is it as a normal number?
  26. 26.🌈 In #0000d6 the blue part is the hex number d6. What is it as a normal number?
  27. 27.🌈 In #750000 the red part is the hex number 75. What is it as a normal number?
  28. 28.🌈 Which colour is #ff0000? (a) white (b) red (c) black (d) magenta
  29. 29.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) bright green (c) magenta (d) yellow
  30. 30.🌈 Which hex code is red? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #ff00ff
  31. 31.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) red (d) blue
  32. 32.🌈 In #000046 the blue part is the hex number 46. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(71, 239, 107)? (a) blue (b) red (c) green
  34. 34.🌈 In #3b0000 the red part is the hex number 3b. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) cyan (c) bright green (d) red
  36. 36.🌈 In #e30000 the red part is the hex number e3. What is it as a normal number?
  37. 37.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
  38. 38.🌈 Which hex code is cyan? (a) #ffff00 (b) #ffffff (c) #ff00ff (d) #00ffff
  39. 39.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) black (d) red
  40. 40.🌈 Which colour is #ffffff? (a) yellow (b) red (c) blue (d) white

Answer key

  1. blue
  2. black
  3. 55
  4. 198
  5. bright green
  6. red
  7. cyan
  8. red
  9. red
  10. 3
  11. 0
  12. 255
  13. blue
  14. bright green
  15. F
  16. blue
  17. white
  18. #ffff00
  19. 232
  20. magenta
  21. red
  22. green
  23. red
  24. 39
  25. 235
  26. 214
  27. 117
  28. red
  29. yellow
  30. #ff0000
  31. magenta
  32. 70
  33. green
  34. 59
  35. red
  36. 227
  37. 77
  38. #00ffff
  39. yellow
  40. white

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