← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 232 · 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(5, 219, 45)? (a) blue (b) red (c) green
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) magenta (d) blue
  3. 3.🌈 Which hex code is magenta? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ffff00
  4. 4.🌈 Which colour of light is strongest in rgb(124, 168, 69)? (a) green (b) blue (c) red
  5. 5.🌈 Which colour of light is strongest in rgb(16, 212, 89)? (a) red (b) green (c) blue
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
  7. 7.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffffff (d) #ffff00
  8. 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  9. 9.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) magenta (d) black
  10. 10.🌈 Which colour of light is strongest in rgb(208, 76, 0)? (a) red (b) green (c) blue
  11. 11.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) yellow (c) cyan (d) bright green
  12. 12.🌈 Which hex code is black? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #000000
  13. 13.🌈 Which colour of light is strongest in rgb(15, 5, 191)? (a) green (b) red (c) blue
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) white (d) bright green
  15. 15.🌈 In #00002e the blue part is the hex number 2e. What is it as a normal number?
  16. 16.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) magenta (d) blue
  17. 17.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
  18. 18.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) cyan (d) white
  19. 19.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  20. 20.🌈 Which hex code is white? (a) #00ffff (b) #000000 (c) #ffffff (d) #00ff00
  21. 21.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) white (d) magenta
  22. 22.🌈 In #00e600 the green part is the hex number e6. What is it as a normal number?
  23. 23.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #ffff00
  24. 24.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(68, 170, 25)? (a) red (b) blue (c) green
  26. 26.🌈 Which colour is #ff0000? (a) black (b) red (c) yellow (d) magenta
  27. 27.🌈 Which colour is #ffffff? (a) white (b) black (c) bright green (d) blue
  28. 28.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  29. 29.🌈 Which colour is #000000? (a) red (b) black (c) magenta (d) white
  30. 30.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) black (c) cyan (d) yellow
  31. 31.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) white (d) red
  33. 33.🌈 In #600000 the red part is the hex number 60. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(49, 223, 28)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour is #00ffff? (a) cyan (b) red (c) bright green (d) magenta
  36. 36.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffff00 (c) #00ffff (d) #0000ff
  37. 37.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) white (d) red
  38. 38.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  39. 39.🌈 Which colour of light is strongest in rgb(135, 156, 97)? (a) blue (b) red (c) green
  40. 40.🌈 In #9f0000 the red part is the hex number 9f. What is it as a normal number?

Answer key

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

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