← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 80 · 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 hex code is bright green? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #ffffff
  2. 2.🌈 Which colour of light is strongest in rgb(111, 40, 230)? (a) green (b) red (c) blue
  3. 3.🌈 Which hex code is yellow? (a) #000000 (b) #0000ff (c) #ffff00 (d) #ff0000
  4. 4.🌈 Which colour is #ff0000? (a) blue (b) black (c) magenta (d) red
  5. 5.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #ff00ff
  6. 6.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #00ffff
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  8. 8.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) black (d) red
  9. 9.🌈 Which colour of light is strongest in rgb(240, 65, 3)? (a) green (b) red (c) blue
  10. 10.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #ffffff (d) #00ff00
  11. 11.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) magenta (c) yellow (d) black
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  13. 13.🌈 In #0000d1 the blue part is the hex number d1. What is it as a normal number?
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  15. 15.🌈 Which colour is #ffff00? (a) red (b) yellow (c) bright green (d) cyan
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
  17. 17.🌈 In #009f00 the green part is the hex number 9f. What is it as a normal number?
  18. 18.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #ffff00 (d) #ffffff
  19. 19.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
  20. 20.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) white (d) black
  21. 21.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) magenta (c) red (d) blue
  22. 22.🌈 In #8b0000 the red part is the hex number 8b. What is it as a normal number?
  23. 23.🌈 Which colour is #00ffff? (a) cyan (b) red (c) black (d) magenta
  24. 24.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
  25. 25.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) bright green (d) blue
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
  28. 28.🌈 Which colour is #0000ff? (a) yellow (b) white (c) blue (d) magenta
  29. 29.🌈 Which colour is #ffffff? (a) yellow (b) bright green (c) blue (d) white
  30. 30.🌈 Which colour is #000000? (a) bright green (b) cyan (c) black (d) white
  31. 31.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) magenta (d) cyan
  32. 32.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #00ff00
  33. 33.🌈 Which colour of light is strongest in rgb(118, 163, 51)? (a) blue (b) red (c) green
  34. 34.🌈 Which colour is #00ff00? (a) black (b) red (c) magenta (d) bright green
  35. 35.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
  36. 36.🌈 Which hex code is black? (a) #ffff00 (b) #ffffff (c) #ff0000 (d) #000000
  37. 37.🌈 Which colour of light is strongest in rgb(215, 103, 29)? (a) red (b) blue (c) green
  38. 38.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
  39. 39.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(253, 42, 87)? (a) blue (b) red (c) green

Answer key

  1. #00ff00
  2. blue
  3. #ffff00
  4. red
  5. #ffffff
  6. #00ffff
  7. 3
  8. black
  9. red
  10. #ff0000
  11. yellow
  12. red
  13. 209
  14. F
  15. yellow
  16. 255
  17. 159
  18. #ff00ff
  19. 171
  20. bright green
  21. red
  22. 139
  23. cyan
  24. 6
  25. 15
  26. white
  27. blue
  28. blue
  29. white
  30. black
  31. blue
  32. #ff00ff
  33. green
  34. bright green
  35. 218
  36. #000000
  37. red
  38. 130
  39. 40
  40. red

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