← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 162 · 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 #004900 the green part is the hex number 49. What is it as a normal number?
  2. 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #ff0000 (d) #000000
  3. 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  5. 5.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) black (c) white (d) bright green
  6. 6.🌈 Which colour of light is strongest in rgb(119, 203, 16)? (a) green (b) red (c) blue
  7. 7.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #00ff00 (d) #ffffff
  8. 8.🌈 In #d40000 the red part is the hex number d4. What is it as a normal number?
  9. 9.🌈 Which colour of light is strongest in rgb(209, 75, 133)? (a) red (b) green (c) blue
  10. 10.🌈 Which colour of light is strongest in rgb(36, 153, 45)? (a) green (b) red (c) blue
  11. 11.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) red (d) bright green
  12. 12.🌈 Which hex code is white? (a) #000000 (b) #00ff00 (c) #ffffff (d) #00ffff
  13. 13.🌈 Which colour of light is strongest in rgb(116, 138, 185)? (a) blue (b) green (c) red
  14. 14.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) magenta (d) white
  15. 15.🌈 In #00005a the blue part is the hex number 5a. What is it as a normal number?
  16. 16.🌈 Which colour of light is strongest in rgb(84, 87, 211)? (a) blue (b) red (c) green
  17. 17.🌈 Which colour is #ffffff? (a) black (b) white (c) bright green (d) blue
  18. 18.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) bright green (c) magenta (d) cyan
  19. 19.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  20. 20.🌈 Which colour of light is strongest in rgb(180, 4, 65)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour of light is strongest in rgb(202, 65, 54)? (a) blue (b) green (c) red
  22. 22.🌈 Which colour is #0000ff? (a) white (b) blue (c) red (d) yellow
  23. 23.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  24. 24.🌈 Which colour of light is strongest in rgb(35, 123, 153)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) red (c) blue (d) white
  26. 26.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) black (d) white
  27. 27.🌈 In #008e00 the green part is the hex number 8e. What is it as a normal number?
  28. 28.🌈 Which hex code is blue? (a) #ff0000 (b) #00ff00 (c) #0000ff (d) #ffffff
  29. 29.🌈 Which colour of light is strongest in rgb(150, 71, 91)? (a) blue (b) red (c) green
  30. 30.🌈 In #ca0000 the red part is the hex number ca. What is it as a normal number?
  31. 31.🌈 Which hex code is red? (a) #ff00ff (b) #ff0000 (c) #00ff00 (d) #000000
  32. 32.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #000000 (d) #00ffff
  33. 33.🌈 Which colour is #ff0000? (a) red (b) blue (c) magenta (d) cyan
  34. 34.🌈 In #000001 the blue part is the hex number 01. What is it as a normal number?
  35. 35.🌈 In #00009a the blue part is the hex number 9a. What is it as a normal number?
  36. 36.🌈 In #00005d the blue part is the hex number 5d. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(80, 173, 89)? (a) red (b) green (c) blue
  38. 38.🌈 In #690000 the red part is the hex number 69. What is it as a normal number?
  39. 39.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  40. 40.🌈 In #00bc00 the green part is the hex number bc. What is it as a normal number?

Answer key

  1. 73
  2. #ff00ff
  3. 3
  4. 255
  5. black
  6. green
  7. #000000
  8. 212
  9. red
  10. green
  11. cyan
  12. #ffffff
  13. blue
  14. yellow
  15. 90
  16. blue
  17. white
  18. cyan
  19. F
  20. red
  21. red
  22. blue
  23. blue
  24. blue
  25. white
  26. red
  27. 142
  28. #0000ff
  29. red
  30. 202
  31. #ff0000
  32. #ffff00
  33. red
  34. 1
  35. 154
  36. 93
  37. green
  38. 105
  39. red
  40. 188

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