← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 250 · 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 #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  2. 2.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
  3. 3.🌈 In #000052 the blue part is the hex number 52. What is it as a normal number?
  4. 4.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) red (d) bright green
  5. 5.🌈 Which hex code is black? (a) #ff0000 (b) #00ff00 (c) #000000 (d) #ff00ff
  6. 6.🌈 Which hex code is bright green? (a) #ff00ff (b) #ffffff (c) #00ff00 (d) #ff0000
  7. 7.🌈 In #00c400 the green part is the hex number c4. What is it as a normal number?
  8. 8.🌈 In #0000b4 the blue part is the hex number b4. What is it as a normal number?
  9. 9.🌈 Which colour is #000000? (a) black (b) red (c) cyan (d) bright green
  10. 10.🌈 In #003a00 the green part is the hex number 3a. What is it as a normal number?
  11. 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  12. 12.🌈 In #003500 the green part is the hex number 35. What is it as a normal number?
  13. 13.🌈 Which colour of light is strongest in rgb(60, 17, 251)? (a) red (b) green (c) blue
  14. 14.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
  15. 15.🌈 Which hex code is blue? (a) #000000 (b) #ffffff (c) #0000ff (d) #ff0000
  16. 16.🌈 Which colour is #ff0000? (a) black (b) blue (c) white (d) red
  17. 17.🌈 Which colour of light is strongest in rgb(64, 117, 201)? (a) green (b) red (c) blue
  18. 18.🌈 Which colour of light is strongest in rgb(38, 77, 153)? (a) red (b) blue (c) green
  19. 19.🌈 Which colour is #ffffff? (a) yellow (b) white (c) red (d) magenta
  20. 20.🌈 Which colour of light is strongest in rgb(213, 26, 108)? (a) blue (b) green (c) red
  21. 21.🌈 Which hex code is cyan? (a) #0000ff (b) #ff00ff (c) #00ffff (d) #00ff00
  22. 22.🌈 Which colour of light is strongest in rgb(178, 53, 63)? (a) red (b) green (c) blue
  23. 23.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
  24. 24.🌈 Which colour of light is strongest in rgb(158, 105, 130)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour of light is strongest in rgb(39, 54, 199)? (a) green (b) blue (c) red
  26. 26.🌈 Which colour is #ff00ff? (a) yellow (b) cyan (c) red (d) magenta
  27. 27.🌈 Which colour of light is strongest in rgb(20, 100, 177)? (a) blue (b) green (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(185, 111, 55)? (a) green (b) red (c) blue
  29. 29.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) bright green (d) yellow
  30. 30.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) blue (c) red (d) white
  31. 31.🌈 In #5e0000 the red part is the hex number 5e. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(240, 33, 85)? (a) red (b) blue (c) green
  33. 33.🌈 In #004a00 the green part is the hex number 4a. What is it as a normal number?
  34. 34.🌈 Which hex code is yellow? (a) #000000 (b) #ffffff (c) #ff0000 (d) #ffff00
  35. 35.🌈 Which colour of light is strongest in rgb(208, 124, 49)? (a) blue (b) green (c) red
  36. 36.🌈 In #000060 the blue part is the hex number 60. What is it as a normal number?
  37. 37.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
  38. 38.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) white (c) red (d) bright green
  39. 39.🌈 In #600000 the red part is the hex number 60. What is it as a normal number?
  40. 40.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?

Answer key

  1. red
  2. 255
  3. 82
  4. cyan
  5. #000000
  6. #00ff00
  7. 196
  8. 180
  9. black
  10. 58
  11. 3
  12. 53
  13. blue
  14. 32
  15. #0000ff
  16. red
  17. blue
  18. blue
  19. white
  20. red
  21. #00ffff
  22. red
  23. blue
  24. red
  25. blue
  26. magenta
  27. blue
  28. red
  29. white
  30. magenta
  31. 94
  32. red
  33. 74
  34. #ffff00
  35. red
  36. 96
  37. 248
  38. red
  39. 96
  40. 155

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