← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 269 · 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.🌈 In #00008c the blue part is the hex number 8c. What is it as a normal number?
  2. 2.🌈 Which colour is #ff00ff? (a) black (b) white (c) magenta (d) cyan
  3. 3.🌈 Which hex code is red? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #ff0000
  4. 4.🌈 Which colour of light is strongest in rgb(4, 203, 24)? (a) blue (b) red (c) green
  5. 5.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) cyan (d) red
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  8. 8.🌈 Which colour is #ffff00? (a) magenta (b) black (c) red (d) yellow
  9. 9.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #ff0000 (d) #ff00ff
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) cyan (c) white (d) black
  11. 11.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) bright green (d) red
  12. 12.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) red (d) white
  13. 13.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) white (d) yellow
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  16. 16.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) red (d) white
  17. 17.🌈 Which colour of light is strongest in rgb(230, 116, 22)? (a) red (b) blue (c) green
  18. 18.🌈 Which colour of light is strongest in rgb(2, 208, 79)? (a) red (b) blue (c) green
  19. 19.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) white (d) yellow
  20. 20.🌈 Which colour is #ffffff? (a) yellow (b) black (c) bright green (d) white
  21. 21.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
  22. 22.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #0000ff
  23. 23.🌈 Which colour of light is strongest in rgb(127, 135, 180)? (a) red (b) blue (c) green
  24. 24.🌈 In #5a0000 the red part is the hex number 5a. What is it as a normal number?
  25. 25.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffffff (d) #00ffff
  26. 26.🌈 In #006d00 the green part is the hex number 6d. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(20, 210, 53)? (a) green (b) blue (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(95, 7, 165)? (a) green (b) red (c) blue
  29. 29.🌈 In #007b00 the green part is the hex number 7b. What is it as a normal number?
  30. 30.🌈 Which hex code is white? (a) #0000ff (b) #00ffff (c) #ffff00 (d) #ffffff
  31. 31.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
  32. 32.🌈 In #0000ad the blue part is the hex number ad. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) white (c) yellow (d) cyan
  34. 34.🌈 Which colour of light is strongest in rgb(4, 176, 64)? (a) blue (b) green (c) red
  35. 35.🌈 Which colour of light is strongest in rgb(153, 5, 7)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(83, 61, 250)? (a) red (b) blue (c) green
  37. 37.🌈 In #000061 the blue part is the hex number 61. What is it as a normal number?
  38. 38.🌈 In #00dc00 the green part is the hex number dc. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(66, 162, 81)? (a) green (b) blue (c) red
  40. 40.🌈 In #9e0000 the red part is the hex number 9e. What is it as a normal number?

Answer key

  1. 140
  2. magenta
  3. #ff0000
  4. green
  5. bright green
  6. F
  7. red
  8. yellow
  9. #0000ff
  10. white
  11. cyan
  12. cyan
  13. bright green
  14. blue
  15. 255
  16. red
  17. red
  18. green
  19. blue
  20. white
  21. 249
  22. #00ff00
  23. blue
  24. 90
  25. #ff00ff
  26. 109
  27. green
  28. blue
  29. 123
  30. #ffffff
  31. 195
  32. 173
  33. magenta
  34. green
  35. red
  36. blue
  37. 97
  38. 220
  39. green
  40. 158

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