← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 69 · 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 hex code is red? (a) #0000ff (b) #00ffff (c) #ff00ff (d) #ff0000
  2. 2.🌈 Which colour of light is strongest in rgb(121, 67, 170)? (a) blue (b) red (c) green
  3. 3.🌈 Which colour is #ffffff? (a) cyan (b) yellow (c) blue (d) white
  4. 4.🌈 Which colour of light is strongest in rgb(237, 24, 69)? (a) green (b) red (c) blue
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  6. 6.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) cyan (c) bright green (d) yellow
  7. 7.🌈 In #360000 the red part is the hex number 36. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) bright green (d) magenta
  9. 9.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) blue (c) bright green (d) cyan
  10. 10.🌈 Which colour of light is strongest in rgb(166, 33, 7)? (a) blue (b) green (c) red
  11. 11.🌈 Which colour of light is strongest in rgb(210, 46, 135)? (a) green (b) blue (c) red
  12. 12.🌈 In #0000cf the blue part is the hex number cf. What is it as a normal number?
  13. 13.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) red (d) white
  14. 14.🌈 In #000080 the blue part is the hex number 80. What is it as a normal number?
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
  16. 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  17. 17.🌈 Which colour of light is strongest in rgb(28, 216, 12)? (a) red (b) green (c) blue
  18. 18.🌈 Which colour of light is strongest in rgb(150, 52, 127)? (a) green (b) red (c) blue
  19. 19.🌈 Which colour of light is strongest in rgb(131, 46, 224)? (a) red (b) green (c) blue
  20. 20.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) cyan (c) black (d) red
  21. 21.🌈 Which colour is #00ffff? (a) cyan (b) red (c) bright green (d) magenta
  22. 22.🌈 Which colour of light is strongest in rgb(31, 185, 12)? (a) blue (b) red (c) green
  23. 23.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #ff00ff
  24. 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  25. 25.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
  26. 26.🌈 In #100000 the red part is the hex number 10. What is it as a normal number?
  27. 27.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(56, 59, 206)? (a) red (b) green (c) blue
  29. 29.🌈 Which colour is #000000? (a) bright green (b) yellow (c) black (d) blue
  30. 30.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
  31. 31.🌈 In #000049 the blue part is the hex number 49. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) black (d) yellow
  33. 33.🌈 Which colour of light is strongest in rgb(65, 99, 157)? (a) blue (b) red (c) green
  34. 34.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(29, 14, 169)? (a) red (b) green (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(88, 210, 33)? (a) red (b) green (c) blue
  37. 37.🌈 Which colour is #0000ff? (a) red (b) blue (c) yellow (d) bright green
  38. 38.🌈 In #5d0000 the red part is the hex number 5d. What is it as a normal number?
  39. 39.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) magenta (c) yellow (d) bright green
  40. 40.🌈 Which colour is #ff0000? (a) black (b) magenta (c) white (d) red

Answer key

  1. #ff0000
  2. blue
  3. white
  4. red
  5. blue
  6. bright green
  7. 54
  8. white
  9. cyan
  10. red
  11. red
  12. 207
  13. magenta
  14. 128
  15. red
  16. F
  17. green
  18. red
  19. blue
  20. black
  21. cyan
  22. green
  23. #00ff00
  24. 3
  25. 80
  26. 16
  27. 3
  28. blue
  29. black
  30. 40
  31. 73
  32. red
  33. blue
  34. 172
  35. blue
  36. green
  37. blue
  38. 93
  39. yellow
  40. red

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