← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 270 · 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 #000200 the green part is the hex number 02. What is it as a normal number?
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  3. 3.🌈 Which colour is #ffffff? (a) magenta (b) white (c) bright green (d) cyan
  4. 4.🌈 Which colour is #ff0000? (a) cyan (b) white (c) blue (d) red
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  6. 6.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) magenta (c) black (d) yellow
  7. 7.🌈 Which colour of light is strongest in rgb(172, 119, 51)? (a) red (b) blue (c) green
  8. 8.🌈 In #002e00 the green part is the hex number 2e. What is it as a normal number?
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  10. 10.🌈 Which hex code is black? (a) #ffff00 (b) #0000ff (c) #000000 (d) #00ff00
  11. 11.🌈 Which colour of light is strongest in rgb(65, 140, 203)? (a) red (b) green (c) blue
  12. 12.🌈 In #1b0000 the red part is the hex number 1b. What is it as a normal number?
  13. 13.🌈 Which hex code is red? (a) #ff00ff (b) #ffffff (c) #ff0000 (d) #00ffff
  14. 14.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
  15. 15.🌈 Which hex code is bright green? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #00ff00
  16. 16.🌈 Which colour of light is strongest in rgb(233, 73, 101)? (a) blue (b) red (c) green
  17. 17.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) magenta (c) bright green (d) cyan
  18. 18.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) yellow (c) cyan (d) black
  19. 19.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) yellow (c) blue (d) bright green
  20. 20.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) black (d) cyan
  21. 21.🌈 Which colour is #00ffff? (a) black (b) cyan (c) blue (d) magenta
  22. 22.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) bright green (d) red
  23. 23.🌈 Which hex code is cyan? (a) #0000ff (b) #ff0000 (c) #ffff00 (d) #00ffff
  24. 24.🌈 Which colour of light is strongest in rgb(214, 67, 53)? (a) blue (b) green (c) red
  25. 25.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
  26. 26.🌈 Which colour of light is strongest in rgb(193, 64, 55)? (a) red (b) green (c) blue
  27. 27.🌈 In #660000 the red part is the hex number 66. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) white (c) black (d) red
  29. 29.🌈 Which colour of light is strongest in rgb(41, 174, 42)? (a) blue (b) green (c) red
  30. 30.🌈 Which colour is #ffff00? (a) white (b) bright green (c) yellow (d) red
  31. 31.🌈 Which colour of light is strongest in rgb(12, 239, 106)? (a) green (b) blue (c) red
  32. 32.🌈 In #00005b the blue part is the hex number 5b. What is it as a normal number?
  33. 33.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  34. 34.🌈 In #00e200 the green part is the hex number e2. What is it as a normal number?
  35. 35.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
  36. 36.🌈 Which colour is #000000? (a) bright green (b) cyan (c) black (d) yellow
  37. 37.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ffff
  38. 38.🌈 Which colour is #00ff00? (a) cyan (b) white (c) black (d) bright green
  39. 39.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #00ffff
  40. 40.🌈 Which colour of light is strongest in rgb(41, 74, 225)? (a) green (b) blue (c) red

Answer key

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

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