← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 133 · 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.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  2. 2.🌈 In #00c700 the green part is the hex number c7. What is it as a normal number?
  3. 3.🌈 Which colour is #ff0000? (a) bright green (b) magenta (c) red (d) white
  4. 4.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #ffffff
  5. 5.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  7. 7.🌈 Which colour is #ff00ff? (a) blue (b) cyan (c) magenta (d) black
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  9. 9.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
  10. 10.🌈 In #00002e the blue part is the hex number 2e. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) yellow (c) cyan (d) magenta
  12. 12.🌈 In #ca0000 the red part is the hex number ca. What is it as a normal number?
  13. 13.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #000000
  14. 14.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) yellow (c) magenta (d) red
  15. 15.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) magenta (d) blue
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  17. 17.🌈 Which colour of light is strongest in rgb(133, 183, 121)? (a) red (b) blue (c) green
  18. 18.🌈 Which hex code is blue? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #0000ff
  19. 19.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) yellow (c) magenta (d) bright green
  20. 20.🌈 Which colour of light is strongest in rgb(171, 134, 97)? (a) red (b) blue (c) green
  21. 21.🌈 Which colour is #ffff00? (a) red (b) white (c) yellow (d) bright green
  22. 22.🌈 In #004c00 the green part is the hex number 4c. What is it as a normal number?
  23. 23.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) magenta (d) black
  25. 25.🌈 Which colour is #ffffff? (a) blue (b) magenta (c) white (d) yellow
  26. 26.🌈 Which colour of light is strongest in rgb(49, 68, 166)? (a) blue (b) red (c) green
  27. 27.🌈 Which colour of light is strongest in rgb(49, 99, 204)? (a) red (b) green (c) blue
  28. 28.🌈 In #130000 the red part is the hex number 13. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(47, 47, 162)? (a) green (b) blue (c) red
  30. 30.🌈 In #00be00 the green part is the hex number be. What is it as a normal number?
  31. 31.🌈 In #a20000 the red part is the hex number a2. What is it as a normal number?
  32. 32.🌈 Which colour is #00ff00? (a) bright green (b) white (c) black (d) blue
  33. 33.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) blue (d) black
  34. 34.🌈 In #0000ec the blue part is the hex number ec. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(157, 8, 33)? (a) blue (b) red (c) green
  36. 36.🌈 Which hex code is yellow? (a) #00ffff (b) #ffffff (c) #ffff00 (d) #00ff00
  37. 37.🌈 In #8e0000 the red part is the hex number 8e. What is it as a normal number?
  38. 38.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #00ffff
  39. 39.🌈 Which colour of light is strongest in rgb(117, 229, 125)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(104, 81, 229)? (a) red (b) green (c) blue

Answer key

  1. blue
  2. 199
  3. red
  4. #ff00ff
  5. 35
  6. 255
  7. magenta
  8. red
  9. 195
  10. 46
  11. cyan
  12. 202
  13. #ff0000
  14. magenta
  15. blue
  16. 3
  17. green
  18. #0000ff
  19. black
  20. red
  21. yellow
  22. 76
  23. 10
  24. white
  25. white
  26. blue
  27. blue
  28. 19
  29. blue
  30. 190
  31. 162
  32. bright green
  33. blue
  34. 236
  35. red
  36. #ffff00
  37. 142
  38. #00ffff
  39. green
  40. blue

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