← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 271 · 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 #0e0000 the red part is the hex number 0e. What is it as a normal number?
  2. 2.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) yellow (c) white (d) blue
  3. 3.🌈 Which colour of light is strongest in rgb(238, 34, 98)? (a) green (b) red (c) blue
  4. 4.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) bright green (c) yellow (d) black
  5. 5.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) blue (d) cyan
  6. 6.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) blue (c) magenta (d) black
  7. 7.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) black (d) yellow
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  9. 9.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #ff00ff
  10. 10.🌈 Which colour of light is strongest in rgb(232, 105, 111)? (a) blue (b) red (c) green
  11. 11.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #000000 (d) #0000ff
  12. 12.🌈 Which colour of light is strongest in rgb(151, 55, 123)? (a) green (b) red (c) blue
  13. 13.🌈 Which colour of light is strongest in rgb(189, 140, 28)? (a) green (b) red (c) blue
  14. 14.🌈 Which colour of light is strongest in rgb(42, 180, 123)? (a) red (b) blue (c) green
  15. 15.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) cyan (d) white
  16. 16.🌈 Which hex code is magenta? (a) #ffffff (b) #00ffff (c) #ffff00 (d) #ff00ff
  17. 17.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?
  18. 18.🌈 Which colour of light is strongest in rgb(11, 137, 172)? (a) red (b) green (c) blue
  19. 19.🌈 Which hex code is bright green? (a) #00ffff (b) #ff00ff (c) #00ff00 (d) #0000ff
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  21. 21.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  22. 22.🌈 In #700000 the red part is the hex number 70. What is it as a normal number?
  23. 23.🌈 Which colour is #ff0000? (a) blue (b) cyan (c) magenta (d) red
  24. 24.🌈 Which colour is #000000? (a) magenta (b) black (c) white (d) bright green
  25. 25.🌈 In #e70000 the red part is the hex number e7. What is it as a normal number?
  26. 26.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
  27. 27.🌈 In #2c0000 the red part is the hex number 2c. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) cyan (c) red (d) white
  29. 29.🌈 Which colour of light is strongest in rgb(84, 29, 152)? (a) green (b) blue (c) red
  30. 30.🌈 Which colour of light is strongest in rgb(97, 154, 119)? (a) green (b) blue (c) red
  31. 31.🌈 Which colour is #0000ff? (a) red (b) blue (c) magenta (d) yellow
  32. 32.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  33. 33.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) magenta (c) yellow (d) black
  34. 34.🌈 In #970000 the red part is the hex number 97. What is it as a normal number?
  35. 35.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
  36. 36.🌈 In #8b0000 the red part is the hex number 8b. What is it as a normal number?
  37. 37.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ff00ff (d) #00ffff
  38. 38.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  39. 39.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(40, 174, 106)? (a) blue (b) green (c) red

Answer key

  1. 14
  2. blue
  3. red
  4. cyan
  5. magenta
  6. magenta
  7. black
  8. blue
  9. #0000ff
  10. red
  11. #ff0000
  12. red
  13. red
  14. green
  15. bright green
  16. #ff00ff
  17. 22
  18. blue
  19. #00ff00
  20. red
  21. 255
  22. 112
  23. red
  24. black
  25. 231
  26. 92
  27. 44
  28. white
  29. blue
  30. green
  31. blue
  32. F
  33. yellow
  34. 151
  35. 64
  36. 139
  37. #000000
  38. 3
  39. 206
  40. green

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