← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 309 · 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 of light is strongest in rgb(74, 10, 253)? (a) red (b) blue (c) green
  2. 2.🌈 Which colour is #0000ff? (a) bright green (b) cyan (c) black (d) blue
  3. 3.🌈 Which colour is #00ff00? (a) white (b) magenta (c) bright green (d) blue
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) black (d) red
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  6. 6.🌈 Which colour is #ff0000? (a) bright green (b) cyan (c) black (d) red
  7. 7.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
  8. 8.🌈 Which colour is #ffffff? (a) cyan (b) black (c) red (d) white
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  10. 10.🌈 Which hex code is yellow? (a) #00ff00 (b) #000000 (c) #ffff00 (d) #00ffff
  11. 11.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #000000 (d) #00ff00
  12. 12.🌈 Which colour is #000000? (a) blue (b) black (c) bright green (d) yellow
  13. 13.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) white (c) magenta (d) black
  14. 14.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) black (c) magenta (d) bright green
  15. 15.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #000000 (d) #ff00ff
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) cyan (d) bright green
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  19. 19.🌈 Which colour is #00ffff? (a) cyan (b) white (c) red (d) magenta
  20. 20.🌈 Which colour of light is strongest in rgb(154, 118, 53)? (a) red (b) green (c) blue
  21. 21.🌈 In #000060 the blue part is the hex number 60. What is it as a normal number?
  22. 22.🌈 In #640000 the red part is the hex number 64. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) magenta (d) yellow
  24. 24.🌈 In #000045 the blue part is the hex number 45. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(60, 102, 236)? (a) green (b) blue (c) red
  26. 26.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) magenta (d) yellow
  27. 27.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
  28. 28.🌈 In #003700 the green part is the hex number 37. What is it as a normal number?
  29. 29.🌈 In #0000c7 the blue part is the hex number c7. What is it as a normal number?
  30. 30.🌈 In #180000 the red part is the hex number 18. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(212, 25, 104)? (a) red (b) green (c) blue
  32. 32.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #ffff00
  33. 33.🌈 Which hex code is black? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #000000
  34. 34.🌈 Which colour of light is strongest in rgb(236, 108, 80)? (a) blue (b) green (c) red
  35. 35.🌈 Which colour of light is strongest in rgb(163, 135, 23)? (a) green (b) red (c) blue
  36. 36.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  37. 37.🌈 Which colour of light is strongest in rgb(169, 37, 114)? (a) green (b) red (c) blue
  38. 38.🌈 In #0000a0 the blue part is the hex number a0. What is it as a normal number?
  39. 39.🌈 In #009500 the green part is the hex number 95. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(118, 53, 238)? (a) blue (b) red (c) green

Answer key

  1. blue
  2. blue
  3. bright green
  4. yellow
  5. F
  6. red
  7. 129
  8. white
  9. blue
  10. #ffff00
  11. #0000ff
  12. black
  13. magenta
  14. cyan
  15. #ff0000
  16. 255
  17. red
  18. red
  19. cyan
  20. red
  21. 96
  22. 100
  23. bright green
  24. 69
  25. blue
  26. white
  27. 164
  28. 55
  29. 199
  30. 24
  31. red
  32. #ff00ff
  33. #000000
  34. red
  35. red
  36. 3
  37. red
  38. 160
  39. 149
  40. blue

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