← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 115 · 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 hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ffffff (d) #0000ff
  2. 2.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #00ffff (d) #ff00ff
  3. 3.🌈 In #040000 the red part is the hex number 04. What is it as a normal number?
  4. 4.🌈 Which colour of light is strongest in rgb(120, 172, 51)? (a) blue (b) red (c) green
  5. 5.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #ffffff (d) #0000ff
  6. 6.🌈 Which colour of light is strongest in rgb(27, 172, 28)? (a) green (b) red (c) blue
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  8. 8.🌈 In #005800 the green part is the hex number 58. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) yellow (c) white (d) cyan
  10. 10.🌈 Which colour of light is strongest in rgb(182, 125, 88)? (a) blue (b) red (c) green
  11. 11.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) yellow (d) black
  12. 12.🌈 Which colour of light is strongest in rgb(89, 159, 33)? (a) red (b) blue (c) green
  13. 13.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) white (c) red (d) magenta
  14. 14.🌈 Which colour of light is strongest in rgb(240, 21, 51)? (a) red (b) blue (c) green
  15. 15.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  16. 16.🌈 Which colour of light is strongest in rgb(26, 13, 208)? (a) green (b) blue (c) red
  17. 17.🌈 Which colour of light is strongest in rgb(14, 132, 179)? (a) green (b) blue (c) red
  18. 18.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  19. 19.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) bright green (d) red
  20. 20.🌈 Which colour is #00ffff? (a) white (b) yellow (c) cyan (d) black
  21. 21.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  22. 22.🌈 Which colour is #000000? (a) black (b) white (c) magenta (d) yellow
  23. 23.🌈 Which colour is #ff0000? (a) cyan (b) magenta (c) blue (d) red
  24. 24.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  25. 25.🌈 In #00007f the blue part is the hex number 7f. What is it as a normal number?
  26. 26.🌈 Which colour is #ffff00? (a) red (b) black (c) blue (d) yellow
  27. 27.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) yellow (d) cyan
  28. 28.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) black (d) red
  29. 29.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #ff0000 (d) #00ffff
  30. 30.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) white (c) magenta (d) cyan
  31. 31.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) black (d) red
  32. 32.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(24, 235, 134)? (a) red (b) blue (c) green
  34. 34.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) black (d) white
  35. 35.🌈 In #9f0000 the red part is the hex number 9f. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(5, 190, 91)? (a) blue (b) green (c) red
  37. 37.🌈 In #540000 the red part is the hex number 54. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(115, 111, 192)? (a) green (b) red (c) blue
  39. 39.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(71, 214, 114)? (a) red (b) blue (c) green

Answer key

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

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