← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 192 · 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 hex code is red? (a) #000000 (b) #ffff00 (c) #00ffff (d) #ff0000
  2. 2.🌈 Which colour of light is strongest in rgb(20, 240, 23)? (a) red (b) green (c) blue
  3. 3.🌈 Which colour of light is strongest in rgb(60, 131, 228)? (a) red (b) green (c) blue
  4. 4.🌈 Which hex code is bright green? (a) #ffff00 (b) #ffffff (c) #ff0000 (d) #00ff00
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  7. 7.🌈 Which colour is #000000? (a) red (b) white (c) black (d) bright green
  8. 8.🌈 Which colour of light is strongest in rgb(104, 103, 248)? (a) green (b) blue (c) red
  9. 9.🌈 Which colour of light is strongest in rgb(130, 236, 34)? (a) green (b) red (c) blue
  10. 10.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
  11. 11.🌈 Which hex code is blue? (a) #00ffff (b) #ff0000 (c) #ffffff (d) #0000ff
  12. 12.🌈 Which colour is #00ff00? (a) white (b) black (c) cyan (d) bright green
  13. 13.🌈 Which colour of light is strongest in rgb(3, 11, 160)? (a) green (b) red (c) blue
  14. 14.🌈 Which colour is #ffff00? (a) magenta (b) bright green (c) white (d) yellow
  15. 15.🌈 Which colour of light is strongest in rgb(253, 79, 41)? (a) red (b) green (c) blue
  16. 16.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ffff (c) #000000 (d) #00ff00
  17. 17.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) yellow (c) red (d) blue
  18. 18.🌈 Which colour of light is strongest in rgb(3, 97, 176)? (a) green (b) blue (c) red
  19. 19.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) red (c) cyan (d) magenta
  20. 20.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #00ffff
  21. 21.🌈 Which colour of light is strongest in rgb(3, 220, 52)? (a) red (b) blue (c) green
  22. 22.🌈 Which colour of light is strongest in rgb(192, 43, 27)? (a) blue (b) green (c) red
  23. 23.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) bright green (d) blue
  24. 24.🌈 Which colour of light is strongest in rgb(57, 246, 136)? (a) red (b) green (c) blue
  25. 25.🌈 Which colour of light is strongest in rgb(44, 240, 65)? (a) blue (b) red (c) green
  26. 26.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  27. 27.🌈 Which colour of light is strongest in rgb(25, 2, 212)? (a) green (b) red (c) blue
  28. 28.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
  29. 29.🌈 Which colour is #ff00ff? (a) bright green (b) black (c) blue (d) magenta
  30. 30.🌈 Which hex code is yellow? (a) #00ffff (b) #00ff00 (c) #ffff00 (d) #ff00ff
  31. 31.🌈 In #0000d0 the blue part is the hex number d0. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(14, 52, 216)? (a) green (b) blue (c) red
  33. 33.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) blue (d) bright green
  34. 34.🌈 Which colour is #0000ff? (a) red (b) blue (c) magenta (d) black
  35. 35.🌈 Which colour is #ff0000? (a) black (b) red (c) yellow (d) white
  36. 36.🌈 Which colour of light is strongest in rgb(132, 83, 160)? (a) green (b) red (c) blue
  37. 37.🌈 In #5e0000 the red part is the hex number 5e. What is it as a normal number?
  38. 38.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(6, 229, 5)? (a) green (b) red (c) blue
  40. 40.🌈 Which colour is #00ffff? (a) yellow (b) red (c) cyan (d) magenta

Answer key

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

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