← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 357 · 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 #ff0000? (a) yellow (b) blue (c) black (d) red
  2. 2.🌈 Which hex code is bright green? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #ff0000
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  4. 4.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) magenta (c) white (d) cyan
  5. 5.🌈 Which colour is #00ff00? (a) white (b) red (c) cyan (d) bright green
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  7. 7.🌈 Which colour of light is strongest in rgb(210, 18, 21)? (a) green (b) red (c) blue
  8. 8.🌈 Which colour is #00ffff? (a) red (b) white (c) cyan (d) yellow
  9. 9.🌈 In #000e00 the green part is the hex number 0e. What is it as a normal number?
  10. 10.🌈 In #004f00 the green part is the hex number 4f. What is it as a normal number?
  11. 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  12. 12.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #0000ff (d) #ff0000
  13. 13.🌈 Which hex code is black? (a) #00ff00 (b) #ff00ff (c) #ffffff (d) #000000
  14. 14.🌈 Which colour is #000000? (a) bright green (b) magenta (c) yellow (d) black
  15. 15.🌈 Which colour of light is strongest in rgb(179, 68, 31)? (a) green (b) red (c) blue
  16. 16.🌈 In #1b0000 the red part is the hex number 1b. What is it as a normal number?
  17. 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
  19. 19.🌈 In #00af00 the green part is the hex number af. What is it as a normal number?
  20. 20.🌈 Which colour of light is strongest in rgb(228, 115, 5)? (a) red (b) green (c) blue
  21. 21.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) white (c) cyan (d) yellow
  22. 22.🌈 Which colour is #ff00ff? (a) red (b) cyan (c) blue (d) magenta
  23. 23.🌈 Which colour is #ffffff? (a) yellow (b) magenta (c) white (d) red
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) bright green (c) magenta (d) white
  25. 25.🌈 Which colour of light is strongest in rgb(20, 159, 78)? (a) red (b) blue (c) green
  26. 26.🌈 Which colour of light is strongest in rgb(240, 93, 94)? (a) blue (b) red (c) green
  27. 27.🌈 In #380000 the red part is the hex number 38. What is it as a normal number?
  28. 28.🌈 In #00c700 the green part is the hex number c7. What is it as a normal number?
  29. 29.🌈 In #000041 the blue part is the hex number 41. What is it as a normal number?
  30. 30.🌈 Which colour is #ffff00? (a) yellow (b) cyan (c) bright green (d) red
  31. 31.🌈 Which colour of light is strongest in rgb(228, 0, 54)? (a) red (b) blue (c) green
  32. 32.🌈 Which colour of light is strongest in rgb(34, 222, 60)? (a) red (b) green (c) blue
  33. 33.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #0000ff
  34. 34.🌈 Which colour of light is strongest in rgb(40, 19, 222)? (a) green (b) red (c) blue
  35. 35.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
  36. 36.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) magenta (d) red
  37. 37.🌈 Which colour of light is strongest in rgb(33, 92, 202)? (a) red (b) blue (c) green
  38. 38.🌈 Which colour is #0000ff? (a) yellow (b) cyan (c) magenta (d) blue
  39. 39.🌈 In #460000 the red part is the hex number 46. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(72, 138, 237)? (a) blue (b) red (c) green

Answer key

  1. red
  2. #00ff00
  3. blue
  4. cyan
  5. bright green
  6. red
  7. red
  8. cyan
  9. 14
  10. 79
  11. 3
  12. #ff00ff
  13. #000000
  14. black
  15. red
  16. 27
  17. F
  18. 255
  19. 175
  20. red
  21. yellow
  22. magenta
  23. white
  24. white
  25. green
  26. red
  27. 56
  28. 199
  29. 65
  30. yellow
  31. red
  32. green
  33. #ffff00
  34. blue
  35. 145
  36. red
  37. blue
  38. blue
  39. 70
  40. blue

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