← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 14 · 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 of light is strongest in rgb(29, 97, 158)? (a) red (b) green (c) blue
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  3. 3.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) cyan (d) red
  4. 4.🌈 Which colour of light is strongest in rgb(186, 93, 21)? (a) blue (b) green (c) red
  5. 5.🌈 In #6e0000 the red part is the hex number 6e. What is it as a normal number?
  6. 6.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) white (c) blue (d) yellow
  7. 7.🌈 Which colour of light is strongest in rgb(33, 183, 61)? (a) red (b) blue (c) green
  8. 8.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #ff0000
  9. 9.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) blue (c) red (d) cyan
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  11. 11.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff0000 (c) #ffffff (d) #00ffff
  12. 12.🌈 Which colour is #00ffff? (a) bright green (b) magenta (c) cyan (d) white
  13. 13.🌈 In #006c00 the green part is the hex number 6c. What is it as a normal number?
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  15. 15.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) blue (c) white (d) bright green
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  17. 17.🌈 Which colour is #ff0000? (a) white (b) black (c) red (d) magenta
  18. 18.🌈 Which colour of light is strongest in rgb(6, 136, 167)? (a) green (b) blue (c) red
  19. 19.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
  20. 20.🌈 Which colour is #0000ff? (a) black (b) blue (c) cyan (d) magenta
  21. 21.🌈 Which colour of light is strongest in rgb(129, 8, 192)? (a) blue (b) red (c) green
  22. 22.🌈 Which colour is #000000? (a) red (b) black (c) blue (d) yellow
  23. 23.🌈 Which colour of light is strongest in rgb(4, 241, 32)? (a) red (b) green (c) blue
  24. 24.🌈 Which colour of light is strongest in rgb(199, 20, 109)? (a) red (b) green (c) blue
  25. 25.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #0000ff (d) #ff00ff
  26. 26.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) cyan (c) red (d) yellow
  27. 27.🌈 In #00009d the blue part is the hex number 9d. What is it as a normal number?
  28. 28.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  29. 29.🌈 Which colour of light is strongest in rgb(161, 136, 139)? (a) red (b) green (c) blue
  30. 30.🌈 Which colour is #ffffff? (a) blue (b) black (c) white (d) yellow
  31. 31.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) bright green (d) red
  32. 32.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
  33. 33.🌈 In #ca0000 the red part is the hex number ca. What is it as a normal number?
  34. 34.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
  35. 35.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(139, 220, 103)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour of light is strongest in rgb(171, 50, 32)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour of light is strongest in rgb(74, 245, 24)? (a) red (b) green (c) blue
  39. 39.🌈 Which colour of light is strongest in rgb(40, 76, 202)? (a) red (b) green (c) blue
  40. 40.🌈 Which hex code is white? (a) #ff0000 (b) #0000ff (c) #ffffff (d) #00ff00

Answer key

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

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