← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 87 · 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) red (b) green (c) blue (d) white
  2. 2.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  4. 4.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #0000ff (d) #ffffff
  5. 5.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) cyan (d) white
  6. 6.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) yellow (c) bright green (d) black
  7. 7.🌈 Which hex code is white? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #ffffff
  8. 8.🌈 Which hex code is magenta? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #000000
  9. 9.🌈 In #00a700 the green part is the hex number a7. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) blue (d) black
  11. 11.🌈 Which colour is #00ff00? (a) cyan (b) red (c) bright green (d) yellow
  12. 12.🌈 Which hex code is cyan? (a) #ffff00 (b) #ffffff (c) #ff00ff (d) #00ffff
  13. 13.🌈 Which colour of light is strongest in rgb(29, 101, 164)? (a) red (b) blue (c) green
  14. 14.🌈 In #005100 the green part is the hex number 51. What is it as a normal number?
  15. 15.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  16. 16.🌈 In #c10000 the red part is the hex number c1. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(44, 239, 65)? (a) red (b) green (c) blue
  18. 18.🌈 Which colour of light is strongest in rgb(132, 185, 36)? (a) red (b) green (c) blue
  19. 19.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  20. 20.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) yellow (d) bright green
  21. 21.🌈 Which colour of light is strongest in rgb(221, 76, 2)? (a) green (b) blue (c) red
  22. 22.🌈 In #003500 the green part is the hex number 35. What is it as a normal number?
  23. 23.🌈 Which colour is #ff0000? (a) yellow (b) red (c) blue (d) black
  24. 24.🌈 Which colour of light is strongest in rgb(192, 96, 125)? (a) red (b) green (c) blue
  25. 25.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) bright green (c) black (d) cyan
  27. 27.🌈 Which colour of light is strongest in rgb(99, 150, 51)? (a) green (b) red (c) blue
  28. 28.🌈 In #00b800 the green part is the hex number b8. What is it as a normal number?
  29. 29.🌈 In #0000f8 the blue part is the hex number f8. What is it as a normal number?
  30. 30.🌈 In #fc0000 the red part is the hex number fc. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(187, 138, 5)? (a) green (b) red (c) blue
  32. 32.🌈 Which colour of light is strongest in rgb(79, 119, 239)? (a) blue (b) green (c) red
  33. 33.🌈 Which colour is #0000ff? (a) bright green (b) red (c) black (d) blue
  34. 34.🌈 Which hex code is red? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #000000
  35. 35.🌈 In #000053 the blue part is the hex number 53. What is it as a normal number?
  36. 36.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(113, 182, 71)? (a) red (b) green (c) blue
  38. 38.🌈 Which colour is #ffffff? (a) magenta (b) white (c) red (d) black
  39. 39.🌈 Which colour is #000000? (a) yellow (b) black (c) blue (d) bright green
  40. 40.🌈 Which colour of light is strongest in rgb(47, 220, 25)? (a) green (b) red (c) blue

Answer key

  1. blue
  2. 37
  3. red
  4. #000000
  5. red
  6. bright green
  7. #ffffff
  8. #ff00ff
  9. 167
  10. white
  11. bright green
  12. #00ffff
  13. blue
  14. 81
  15. 3
  16. 193
  17. green
  18. green
  19. F
  20. black
  21. red
  22. 53
  23. red
  24. red
  25. 57
  26. cyan
  27. green
  28. 184
  29. 248
  30. 252
  31. red
  32. blue
  33. blue
  34. #ff0000
  35. 83
  36. 243
  37. green
  38. white
  39. black
  40. green

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