← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 348 · 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.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) cyan (c) bright green (d) magenta
  2. 2.🌈 Which colour is #ff0000? (a) cyan (b) red (c) blue (d) magenta
  3. 3.🌈 Which colour is #0000ff? (a) bright green (b) white (c) cyan (d) blue
  4. 4.🌈 Which hex code is black? (a) #ff0000 (b) #00ffff (c) #000000 (d) #0000ff
  5. 5.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) black (d) white
  6. 6.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) white (d) blue
  7. 7.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #ffffff (d) #ff0000
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  9. 9.🌈 Which colour of light is strongest in rgb(41, 2, 180)? (a) red (b) green (c) blue
  10. 10.🌈 Which hex code is white? (a) #ff00ff (b) #00ff00 (c) #ffffff (d) #ff0000
  11. 11.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) magenta (d) red
  12. 12.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) yellow (d) red
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  14. 14.🌈 In #7d0000 the red part is the hex number 7d. What is it as a normal number?
  15. 15.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #0000ff
  16. 16.🌈 In #00f400 the green part is the hex number f4. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(30, 62, 158)? (a) green (b) red (c) blue
  18. 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  19. 19.🌈 Which colour of light is strongest in rgb(163, 133, 47)? (a) red (b) green (c) blue
  20. 20.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) cyan
  21. 21.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
  22. 22.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  23. 23.🌈 Which colour is #ffff00? (a) yellow (b) red (c) bright green (d) cyan
  24. 24.🌈 In #003300 the green part is the hex number 33. What is it as a normal number?
  25. 25.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
  26. 26.🌈 In #005800 the green part is the hex number 58. What is it as a normal number?
  27. 27.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #000000 (d) #ffffff
  28. 28.🌈 Which colour of light is strongest in rgb(98, 163, 69)? (a) blue (b) green (c) red
  29. 29.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) red (d) white
  30. 30.🌈 In #e20000 the red part is the hex number e2. What is it as a normal number?
  31. 31.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) magenta (d) black
  33. 33.🌈 Which colour of light is strongest in rgb(241, 31, 38)? (a) red (b) green (c) blue
  34. 34.🌈 In #0000e2 the blue part is the hex number e2. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(174, 44, 72)? (a) blue (b) red (c) green
  36. 36.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
  37. 37.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  38. 38.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffff00 (d) #00ff00
  39. 39.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  40. 40.🌈 Which colour of light is strongest in rgb(35, 169, 0)? (a) red (b) blue (c) green

Answer key

  1. bright green
  2. red
  3. blue
  4. #000000
  5. white
  6. cyan
  7. #ff00ff
  8. red
  9. blue
  10. #ffffff
  11. cyan
  12. bright green
  13. 3
  14. 125
  15. #ff0000
  16. 244
  17. blue
  18. F
  19. red
  20. black
  21. 69
  22. blue
  23. yellow
  24. 51
  25. 23
  26. 88
  27. #00ffff
  28. green
  29. red
  30. 226
  31. 242
  32. black
  33. red
  34. 226
  35. red
  36. 171
  37. 241
  38. #0000ff
  39. 255
  40. green

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