← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 335 · 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.🌈 In #000073 the blue part is the hex number 73. What is it as a normal number?
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) cyan (d) blue
  3. 3.🌈 In #540000 the red part is the hex number 54. What is it as a normal number?
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  5. 5.🌈 Which colour is #ffff00? (a) blue (b) magenta (c) yellow (d) cyan
  6. 6.🌈 In #00002b the blue part is the hex number 2b. What is it as a normal number?
  7. 7.🌈 Which colour of light is strongest in rgb(49, 150, 109)? (a) blue (b) red (c) green
  8. 8.🌈 Which colour of light is strongest in rgb(7, 19, 239)? (a) red (b) blue (c) green
  9. 9.🌈 Which colour is #ff0000? (a) cyan (b) yellow (c) red (d) blue
  10. 10.🌈 In #001300 the green part is the hex number 13. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) yellow (c) red (d) black
  12. 12.🌈 Which colour of light is strongest in rgb(96, 55, 157)? (a) blue (b) green (c) red
  13. 13.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  14. 14.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) blue (c) magenta (d) yellow
  15. 15.🌈 Which colour is #0000ff? (a) blue (b) red (c) white (d) cyan
  16. 16.🌈 Which colour is #ffffff? (a) black (b) red (c) yellow (d) white
  17. 17.🌈 Which colour of light is strongest in rgb(185, 127, 3)? (a) green (b) blue (c) red
  18. 18.🌈 Which hex code is blue? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #ff0000
  19. 19.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  20. 20.🌈 Which hex code is red? (a) #000000 (b) #00ffff (c) #ff0000 (d) #0000ff
  21. 21.🌈 Which colour of light is strongest in rgb(151, 41, 18)? (a) blue (b) red (c) green
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  23. 23.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #0000ff
  24. 24.🌈 In #c80000 the red part is the hex number c8. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) bright green (c) white (d) red
  26. 26.🌈 Which colour of light is strongest in rgb(127, 170, 133)? (a) red (b) green (c) blue
  27. 27.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) bright green (c) cyan (d) blue
  28. 28.🌈 Which colour is #000000? (a) white (b) magenta (c) black (d) bright green
  29. 29.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
  30. 30.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  31. 31.🌈 Which colour of light is strongest in rgb(43, 111, 212)? (a) green (b) blue (c) red
  32. 32.🌈 Which hex code is black? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #000000
  33. 33.🌈 Which colour is #00ffff? (a) black (b) blue (c) cyan (d) magenta
  34. 34.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
  35. 35.🌈 In #000075 the blue part is the hex number 75. What is it as a normal number?
  36. 36.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #0000ff (d) #ffff00
  37. 37.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) black (d) blue
  38. 38.🌈 Which colour of light is strongest in rgb(208, 20, 80)? (a) red (b) blue (c) green
  39. 39.🌈 Which hex code is magenta? (a) #00ffff (b) #ff00ff (c) #ffffff (d) #0000ff
  40. 40.🌈 Which colour of light is strongest in rgb(63, 224, 68)? (a) red (b) green (c) blue

Answer key

  1. 115
  2. black
  3. 84
  4. 3
  5. yellow
  6. 43
  7. green
  8. blue
  9. red
  10. 19
  11. red
  12. blue
  13. red
  14. magenta
  15. blue
  16. white
  17. red
  18. #0000ff
  19. F
  20. #ff0000
  21. red
  22. 255
  23. #ffff00
  24. 200
  25. white
  26. green
  27. cyan
  28. black
  29. 75
  30. blue
  31. blue
  32. #000000
  33. cyan
  34. 71
  35. 117
  36. #00ffff
  37. bright green
  38. red
  39. #ff00ff
  40. green

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