← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 336 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
  3. 3.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  5. 5.🌈 Which hex code is blue? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #0000ff
  6. 6.🌈 Which colour is #ffffff? (a) black (b) white (c) blue (d) red
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  8. 8.🌈 Which colour is #ff0000? (a) cyan (b) red (c) white (d) black
  9. 9.🌈 Which colour is #00ffff? (a) red (b) white (c) cyan (d) yellow
  10. 10.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) black (c) bright green (d) magenta
  11. 11.🌈 Which colour is #000000? (a) white (b) bright green (c) red (d) black
  12. 12.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffff00 (c) #ff00ff (d) #00ffff
  13. 13.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #ff00ff (d) #000000
  14. 14.🌈 Which colour of light is strongest in rgb(31, 232, 124)? (a) green (b) red (c) blue
  15. 15.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #ff00ff
  16. 16.🌈 Which colour of light is strongest in rgb(151, 77, 57)? (a) red (b) green (c) blue
  17. 17.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) yellow (c) blue (d) cyan
  18. 18.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #0000ff (d) #00ffff
  19. 19.🌈 Which colour of light is strongest in rgb(77, 63, 233)? (a) green (b) blue (c) red
  20. 20.🌈 Which colour is #ff00ff? (a) black (b) magenta (c) bright green (d) blue
  21. 21.🌈 Which colour of light is strongest in rgb(176, 121, 47)? (a) red (b) green (c) blue
  22. 22.🌈 In #480000 the red part is the hex number 48. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) bright green (c) yellow (d) magenta
  24. 24.🌈 In #000026 the blue part is the hex number 26. What is it as a normal number?
  25. 25.🌈 Which colour is #00ff00? (a) cyan (b) blue (c) bright green (d) white
  26. 26.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #ff00ff (d) #00ff00
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) white (d) cyan
  28. 28.🌈 In #0000f5 the blue part is the hex number f5. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(86, 175, 8)? (a) blue (b) green (c) red
  30. 30.🌈 Which colour is #0000ff? (a) white (b) blue (c) magenta (d) black
  31. 31.🌈 Which colour of light is strongest in rgb(37, 154, 78)? (a) blue (b) red (c) green
  32. 32.🌈 Which hex code is yellow? (a) #0000ff (b) #000000 (c) #ffff00 (d) #ff0000
  33. 33.🌈 In #0000fb the blue part is the hex number fb. What is it as a normal number?
  34. 34.🌈 Which colour is #ffff00? (a) magenta (b) white (c) yellow (d) red
  35. 35.🌈 Which colour of light is strongest in rgb(9, 30, 202)? (a) green (b) blue (c) red
  36. 36.🌈 Which colour of light is strongest in rgb(87, 175, 11)? (a) green (b) red (c) blue
  37. 37.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
  38. 38.🌈 In #c70000 the red part is the hex number c7. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(230, 101, 23)? (a) green (b) blue (c) red
  40. 40.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6

Answer key

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

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