← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 351 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  3. 3.🌈 Which colour of light is strongest in rgb(49, 192, 97)? (a) red (b) green (c) blue
  4. 4.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) magenta (d) black
  5. 5.🌈 Which colour of light is strongest in rgb(9, 31, 152)? (a) green (b) red (c) blue
  6. 6.🌈 Which colour of light is strongest in rgb(119, 31, 201)? (a) green (b) red (c) blue
  7. 7.🌈 Which hex code is black? (a) #ffffff (b) #ff0000 (c) #000000 (d) #ff00ff
  8. 8.🌈 Which colour is #ffff00? (a) black (b) yellow (c) bright green (d) blue
  9. 9.🌈 Which colour of light is strongest in rgb(37, 28, 211)? (a) green (b) red (c) blue
  10. 10.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  11. 11.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) black (c) cyan (d) yellow
  12. 12.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) black (c) yellow (d) bright green
  13. 13.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) white (d) red
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  15. 15.🌈 Which colour of light is strongest in rgb(192, 14, 41)? (a) green (b) red (c) blue
  16. 16.🌈 Which colour of light is strongest in rgb(157, 136, 56)? (a) blue (b) red (c) green
  17. 17.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) blue (c) white (d) cyan
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  19. 19.🌈 Which colour is #000000? (a) magenta (b) bright green (c) red (d) black
  20. 20.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) blue (c) bright green (d) red
  21. 21.🌈 Which colour of light is strongest in rgb(213, 77, 17)? (a) blue (b) green (c) red
  22. 22.🌈 Which hex code is cyan? (a) #0000ff (b) #ff00ff (c) #000000 (d) #00ffff
  23. 23.🌈 In #00c200 the green part is the hex number c2. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(140, 214, 122)? (a) red (b) blue (c) green
  25. 25.🌈 In #d70000 the red part is the hex number d7. What is it as a normal number?
  26. 26.🌈 Which colour of light is strongest in rgb(194, 13, 128)? (a) red (b) green (c) blue
  27. 27.🌈 Which colour is #00ffff? (a) blue (b) white (c) magenta (d) cyan
  28. 28.🌈 Which colour is #0000ff? (a) red (b) bright green (c) blue (d) black
  29. 29.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) magenta (d) cyan
  30. 30.🌈 Which hex code is blue? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #0000ff
  31. 31.🌈 Which colour is #ffffff? (a) yellow (b) white (c) red (d) black
  32. 32.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #0000ff
  33. 33.🌈 Which colour of light is strongest in rgb(252, 12, 40)? (a) blue (b) green (c) red
  34. 34.🌈 Which colour is #ff0000? (a) cyan (b) red (c) yellow (d) blue
  35. 35.🌈 Which hex code is magenta? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ff0000
  36. 36.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?
  37. 37.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(56, 95, 187)? (a) red (b) green (c) blue
  39. 39.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #ffff00 (d) #000000
  40. 40.🌈 In #fd0000 the red part is the hex number fd. What is it as a normal number?

Answer key

  1. F
  2. 3
  3. green
  4. bright green
  5. blue
  6. blue
  7. #000000
  8. yellow
  9. blue
  10. red
  11. cyan
  12. yellow
  13. blue
  14. blue
  15. red
  16. red
  17. white
  18. 255
  19. black
  20. red
  21. red
  22. #00ffff
  23. 194
  24. green
  25. 215
  26. red
  27. cyan
  28. blue
  29. bright green
  30. #0000ff
  31. white
  32. #00ff00
  33. red
  34. red
  35. #ff00ff
  36. 219
  37. 178
  38. blue
  39. #ffffff
  40. 253

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