← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 350 · 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) black (b) magenta (c) red (d) blue
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) bright green (d) white
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  4. 4.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #00ffff (d) #00ff00
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  6. 6.🌈 Which colour is #ff0000? (a) bright green (b) yellow (c) red (d) black
  7. 7.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #000000 (d) #ffffff
  8. 8.🌈 Which colour of light is strongest in rgb(20, 69, 160)? (a) green (b) blue (c) red
  9. 9.🌈 In #001a00 the green part is the hex number 1a. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) yellow (d) cyan
  11. 11.🌈 Which colour is #00ff00? (a) red (b) bright green (c) blue (d) white
  12. 12.🌈 Which colour is #ffffff? (a) black (b) yellow (c) white (d) cyan
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  14. 14.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
  15. 15.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #0000ff (d) #ffff00
  16. 16.🌈 In #020000 the red part is the hex number 02. What is it as a normal number?
  17. 17.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  18. 18.🌈 Which colour of light is strongest in rgb(41, 22, 236)? (a) red (b) green (c) blue
  19. 19.🌈 Which hex code is white? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #000000
  20. 20.🌈 Which colour is #000000? (a) black (b) white (c) yellow (d) magenta
  21. 21.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffffff (c) #ffff00 (d) #ff00ff
  22. 22.🌈 In #d10000 the red part is the hex number d1. What is it as a normal number?
  23. 23.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(180, 38, 109)? (a) green (b) blue (c) red
  25. 25.🌈 In #7c0000 the red part is the hex number 7c. What is it as a normal number?
  26. 26.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
  27. 27.🌈 Which colour of light is strongest in rgb(195, 84, 86)? (a) blue (b) red (c) green
  28. 28.🌈 In #410000 the red part is the hex number 41. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(251, 24, 65)? (a) green (b) red (c) blue
  30. 30.🌈 In #b10000 the red part is the hex number b1. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(105, 51, 154)? (a) green (b) red (c) blue
  32. 32.🌈 Which colour is #0000ff? (a) white (b) blue (c) bright green (d) red
  33. 33.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) cyan (d) white
  34. 34.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) white (d) yellow
  35. 35.🌈 Which colour of light is strongest in rgb(138, 208, 124)? (a) blue (b) red (c) green
  36. 36.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) yellow (c) bright green (d) blue
  37. 37.🌈 Which hex code is blue? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #0000ff
  38. 38.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
  39. 39.🌈 In #008600 the green part is the hex number 86. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(169, 102, 37)? (a) green (b) red (c) blue

Answer key

  1. blue
  2. bright green
  3. F
  4. #00ff00
  5. blue
  6. red
  7. #ff0000
  8. blue
  9. 26
  10. magenta
  11. bright green
  12. white
  13. 3
  14. 71
  15. #00ffff
  16. 2
  17. 255
  18. blue
  19. #ffffff
  20. black
  21. #ffff00
  22. 209
  23. 128
  24. red
  25. 124
  26. red
  27. red
  28. 65
  29. red
  30. 177
  31. blue
  32. blue
  33. black
  34. magenta
  35. green
  36. yellow
  37. #0000ff
  38. 133
  39. 134
  40. red

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