← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 52 · 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 last two digits give? (a) green (b) red (c) white (d) blue
  2. 2.🌈 In #00004c the blue part is the hex number 4c. What is it as a normal number?
  3. 3.🌈 Which colour is #000000? (a) black (b) yellow (c) red (d) magenta
  4. 4.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) blue (d) black
  5. 5.🌈 In #00005b the blue part is the hex number 5b. What is it as a normal number?
  6. 6.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
  8. 8.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) red (d) yellow
  9. 9.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) cyan (d) red
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) blue (d) red
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) cyan (c) red (d) bright green
  12. 12.🌈 Which hex code is yellow? (a) #0000ff (b) #00ffff (c) #ffffff (d) #ffff00
  13. 13.🌈 Which colour of light is strongest in rgb(31, 133, 175)? (a) blue (b) green (c) red
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) magenta (d) bright green
  15. 15.🌈 In #d50000 the red part is the hex number d5. What is it as a normal number?
  16. 16.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  17. 17.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) blue (d) red
  18. 18.🌈 Which colour is #ffff00? (a) black (b) white (c) yellow (d) cyan
  19. 19.🌈 Which colour is #ff0000? (a) red (b) bright green (c) magenta (d) blue
  20. 20.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  21. 21.🌈 Which colour of light is strongest in rgb(79, 180, 16)? (a) blue (b) green (c) red
  22. 22.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
  23. 23.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  24. 24.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) red (d) cyan
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) magenta (d) red
  26. 26.🌈 Which colour of light is strongest in rgb(85, 252, 104)? (a) blue (b) red (c) green
  27. 27.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) white (c) yellow (d) bright green
  28. 28.🌈 In #002200 the green part is the hex number 22. What is it as a normal number?
  29. 29.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) white (d) red
  30. 30.🌈 Which colour is #0000ff? (a) white (b) magenta (c) blue (d) black
  31. 31.🌈 In #001100 the green part is the hex number 11. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(132, 154, 54)? (a) green (b) red (c) blue
  33. 33.🌈 Which colour is #ffffff? (a) red (b) yellow (c) white (d) bright green
  34. 34.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
  35. 35.🌈 In #00005d the blue part is the hex number 5d. What is it as a normal number?
  36. 36.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
  37. 37.🌈 Which hex code is bright green? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #00ff00
  38. 38.🌈 In #00004f the blue part is the hex number 4f. What is it as a normal number?
  39. 39.🌈 Which hex code is red? (a) #ffffff (b) #ff00ff (c) #00ffff (d) #ff0000
  40. 40.🌈 Which colour of light is strongest in rgb(171, 22, 8)? (a) blue (b) red (c) green

Answer key

  1. blue
  2. 76
  3. black
  4. bright green
  5. 91
  6. 30
  7. F
  8. blue
  9. magenta
  10. white
  11. red
  12. #ffff00
  13. blue
  14. bright green
  15. 213
  16. red
  17. magenta
  18. yellow
  19. red
  20. 3
  21. green
  22. 195
  23. 255
  24. cyan
  25. black
  26. green
  27. yellow
  28. 34
  29. cyan
  30. blue
  31. 17
  32. green
  33. white
  34. 156
  35. 93
  36. 143
  37. #00ff00
  38. 79
  39. #ff0000
  40. red

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