← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 111 · 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, 255, 0)? (a) yellow (b) bright green (c) blue (d) black
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) bright green (c) magenta (d) black
  3. 3.🌈 Which colour of light is strongest in rgb(213, 90, 59)? (a) red (b) blue (c) green
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
  5. 5.🌈 Which hex code is black? (a) #00ffff (b) #ff00ff (c) #000000 (d) #0000ff
  6. 6.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
  7. 7.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) black (c) blue (d) white
  8. 8.🌈 In #003400 the green part is the hex number 34. What is it as a normal number?
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  11. 11.🌈 In #00006d the blue part is the hex number 6d. What is it as a normal number?
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  13. 13.🌈 In #009e00 the green part is the hex number 9e. What is it as a normal number?
  14. 14.🌈 In #00009f the blue part is the hex number 9f. What is it as a normal number?
  15. 15.🌈 Which hex code is cyan? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ff0000
  16. 16.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) black (c) red (d) bright green
  17. 17.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) magenta (d) black
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  19. 19.🌈 Which colour is #0000ff? (a) black (b) blue (c) magenta (d) cyan
  20. 20.🌈 Which colour of light is strongest in rgb(122, 49, 154)? (a) blue (b) green (c) red
  21. 21.🌈 Which colour of light is strongest in rgb(168, 105, 114)? (a) red (b) green (c) blue
  22. 22.🌈 In #005800 the green part is the hex number 58. What is it as a normal number?
  23. 23.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) blue (d) magenta
  24. 24.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(217, 132, 40)? (a) blue (b) green (c) red
  26. 26.🌈 Which colour of light is strongest in rgb(33, 5, 177)? (a) green (b) blue (c) red
  27. 27.🌈 In #000089 the blue part is the hex number 89. What is it as a normal number?
  28. 28.🌈 In #430000 the red part is the hex number 43. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(85, 170, 133)? (a) blue (b) red (c) green
  30. 30.🌈 Which hex code is yellow? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffff00
  31. 31.🌈 Which colour of light is strongest in rgb(1, 168, 78)? (a) green (b) red (c) blue
  32. 32.🌈 In #002000 the green part is the hex number 20. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) yellow (d) cyan
  34. 34.🌈 Which colour is #ffff00? (a) blue (b) white (c) yellow (d) magenta
  35. 35.🌈 Which hex code is bright green? (a) #00ffff (b) #00ff00 (c) #ff00ff (d) #000000
  36. 36.🌈 Which hex code is white? (a) #ff00ff (b) #000000 (c) #ffff00 (d) #ffffff
  37. 37.🌈 Which colour is #ff0000? (a) magenta (b) yellow (c) red (d) cyan
  38. 38.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(95, 28, 183)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) bright green (c) magenta (d) yellow

Answer key

  1. bright green
  2. black
  3. red
  4. 3
  5. #000000
  6. 41
  7. white
  8. 52
  9. F
  10. 255
  11. 109
  12. blue
  13. 158
  14. 159
  15. #00ffff
  16. red
  17. bright green
  18. red
  19. blue
  20. blue
  21. red
  22. 88
  23. magenta
  24. 208
  25. red
  26. blue
  27. 137
  28. 67
  29. green
  30. #ffff00
  31. green
  32. 32
  33. blue
  34. yellow
  35. #00ff00
  36. #ffffff
  37. red
  38. 1
  39. blue
  40. yellow

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