← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 76 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  2. 2.🌈 Which colour of light is strongest in rgb(127, 119, 202)? (a) green (b) blue (c) red
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  4. 4.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) black (c) bright green (d) blue
  5. 5.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
  7. 7.🌈 Which colour is #ffffff? (a) yellow (b) bright green (c) white (d) red
  8. 8.🌈 In #000036 the blue part is the hex number 36. What is it as a normal number?
  9. 9.🌈 Which hex code is white? (a) #ffff00 (b) #ff00ff (c) #ff0000 (d) #ffffff
  10. 10.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?
  11. 11.🌈 In #006700 the green part is the hex number 67. What is it as a normal number?
  12. 12.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
  13. 13.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #00ffff
  14. 14.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #0000ff (d) #00ff00
  15. 15.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) magenta (d) red
  16. 16.🌈 Which hex code is bright green? (a) #ff0000 (b) #000000 (c) #ffffff (d) #00ff00
  17. 17.🌈 In #004f00 the green part is the hex number 4f. What is it as a normal number?
  18. 18.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) magenta (d) black
  19. 19.🌈 Which colour of light is strongest in rgb(185, 50, 59)? (a) red (b) blue (c) green
  20. 20.🌈 In #ef0000 the red part is the hex number ef. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(154, 133, 42)? (a) red (b) blue (c) green
  22. 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
  23. 23.🌈 In #003000 the green part is the hex number 30. What is it as a normal number?
  24. 24.🌈 Which colour is #0000ff? (a) magenta (b) white (c) yellow (d) blue
  25. 25.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) cyan (d) magenta
  26. 26.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) red (c) white (d) yellow
  28. 28.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
  29. 29.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) red (c) bright green (d) magenta
  31. 31.🌈 In #d40000 the red part is the hex number d4. What is it as a normal number?
  32. 32.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
  33. 33.🌈 Which colour is #ffff00? (a) cyan (b) black (c) yellow (d) bright green
  34. 34.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) bright green (d) cyan
  35. 35.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #00ff00 (d) #000000
  36. 36.🌈 In #d10000 the red part is the hex number d1. What is it as a normal number?
  37. 37.🌈 In #000077 the blue part is the hex number 77. What is it as a normal number?
  38. 38.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffffff (d) #0000ff
  39. 39.🌈 In #00b600 the green part is the hex number b6. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(78, 39, 167)? (a) blue (b) green (c) red

Answer key

  1. 255
  2. blue
  3. blue
  4. bright green
  5. 40
  6. red
  7. white
  8. 54
  9. #ffffff
  10. 9
  11. 103
  12. 126
  13. #ff0000
  14. #00ffff
  15. bright green
  16. #00ff00
  17. 79
  18. cyan
  19. red
  20. 239
  21. red
  22. 3
  23. 48
  24. blue
  25. magenta
  26. 153
  27. yellow
  28. 33
  29. 251
  30. blue
  31. 212
  32. 178
  33. yellow
  34. magenta
  35. #ffff00
  36. 209
  37. 119
  38. #ff00ff
  39. 182
  40. blue

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