← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 152 · 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, 255, 255)? (a) magenta (b) cyan (c) red (d) blue
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  3. 3.🌈 Which colour of light is strongest in rgb(99, 16, 175)? (a) red (b) green (c) blue
  4. 4.🌈 Which colour of light is strongest in rgb(10, 209, 37)? (a) blue (b) red (c) green
  5. 5.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) blue (d) bright green
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  7. 7.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  8. 8.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) bright green (c) yellow (d) blue
  9. 9.🌈 Which hex code is red? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ff0000
  10. 10.🌈 In #000014 the blue part is the hex number 14. What is it as a normal number?
  11. 11.🌈 Which colour is #ffff00? (a) cyan (b) blue (c) yellow (d) black
  12. 12.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  13. 13.🌈 Which hex code is white? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #ffffff
  14. 14.🌈 In #bb0000 the red part is the hex number bb. What is it as a normal number?
  15. 15.🌈 Which hex code is black? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #000000
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
  17. 17.🌈 Which hex code is yellow? (a) #ff00ff (b) #0000ff (c) #ffff00 (d) #00ffff
  18. 18.🌈 Which colour of light is strongest in rgb(111, 74, 209)? (a) green (b) red (c) blue
  19. 19.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) magenta (c) yellow (d) white
  20. 20.🌈 Which colour is #ff0000? (a) white (b) red (c) blue (d) yellow
  21. 21.🌈 Which colour of light is strongest in rgb(154, 60, 20)? (a) red (b) blue (c) green
  22. 22.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
  23. 23.🌈 Which hex code is blue? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #000000
  24. 24.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
  25. 25.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ff00 (c) #0000ff (d) #00ffff
  26. 26.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) cyan (c) yellow (d) bright green
  27. 27.🌈 In #000083 the blue part is the hex number 83. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(24, 124, 193)? (a) green (b) red (c) blue
  29. 29.🌈 In #000020 the blue part is the hex number 20. What is it as a normal number?
  30. 30.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) magenta (d) cyan
  31. 31.🌈 Which colour of light is strongest in rgb(120, 84, 213)? (a) green (b) blue (c) red
  32. 32.🌈 In #00f800 the green part is the hex number f8. What is it as a normal number?
  33. 33.🌈 In #00005d the blue part is the hex number 5d. What is it as a normal number?
  34. 34.🌈 Which colour is #000000? (a) white (b) red (c) bright green (d) black
  35. 35.🌈 Which colour is #ffffff? (a) cyan (b) white (c) black (d) red
  36. 36.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
  37. 37.🌈 Which hex code is cyan? (a) #ffffff (b) #000000 (c) #ff0000 (d) #00ffff
  38. 38.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) bright green (d) blue
  39. 39.🌈 Which colour of light is strongest in rgb(60, 188, 32)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) black (c) red (d) yellow

Answer key

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

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