← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 58 · 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 #ffffff? (a) magenta (b) white (c) cyan (d) bright green
  2. 2.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) bright green (c) white (d) magenta
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  4. 4.🌈 Which colour of light is strongest in rgb(177, 100, 42)? (a) blue (b) green (c) red
  5. 5.🌈 Which hex code is cyan? (a) #ffffff (b) #000000 (c) #ff0000 (d) #00ffff
  6. 6.🌈 Which colour of light is strongest in rgb(226, 86, 118)? (a) red (b) blue (c) green
  7. 7.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
  8. 8.🌈 In #002f00 the green part is the hex number 2f. What is it as a normal number?
  9. 9.🌈 Which colour of light is strongest in rgb(166, 6, 87)? (a) green (b) blue (c) red
  10. 10.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) cyan (c) red (d) magenta
  11. 11.🌈 Which colour is #000000? (a) black (b) red (c) bright green (d) blue
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  13. 13.🌈 Which colour is #00ff00? (a) black (b) red (c) bright green (d) cyan
  14. 14.🌈 Which colour is #ffff00? (a) red (b) white (c) yellow (d) blue
  15. 15.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
  16. 16.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #00ff00 (d) #ff0000
  17. 17.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ff00ff (d) #0000ff
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  19. 19.🌈 Which hex code is blue? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ffff00
  20. 20.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) magenta (d) bright green
  21. 21.🌈 Which colour of light is strongest in rgb(139, 189, 106)? (a) blue (b) red (c) green
  22. 22.🌈 Which colour is #ff0000? (a) black (b) red (c) magenta (d) yellow
  23. 23.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #ff00ff
  24. 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  25. 25.🌈 In #00a500 the green part is the hex number a5. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) bright green (c) cyan (d) white
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
  28. 28.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) white (d) yellow
  29. 29.🌈 Which colour of light is strongest in rgb(113, 51, 180)? (a) green (b) blue (c) red
  30. 30.🌈 In #00004c the blue part is the hex number 4c. What is it as a normal number?
  31. 31.🌈 In #004400 the green part is the hex number 44. What is it as a normal number?
  32. 32.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
  33. 33.🌈 In #005400 the green part is the hex number 54. What is it as a normal number?
  34. 34.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #ffff00
  35. 35.🌈 Which colour is #00ffff? (a) blue (b) yellow (c) red (d) cyan
  36. 36.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) cyan (c) bright green (d) black
  37. 37.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
  38. 38.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ffff00
  39. 39.🌈 In #780000 the red part is the hex number 78. What is it as a normal number?
  40. 40.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?

Answer key

  1. white
  2. magenta
  3. red
  4. red
  5. #00ffff
  6. red
  7. 65
  8. 47
  9. red
  10. red
  11. black
  12. F
  13. bright green
  14. yellow
  15. 58
  16. #ffffff
  17. #000000
  18. 255
  19. #0000ff
  20. white
  21. green
  22. red
  23. #ff00ff
  24. 3
  25. 165
  26. cyan
  27. blue
  28. blue
  29. blue
  30. 76
  31. 68
  32. 102
  33. 84
  34. #00ff00
  35. cyan
  36. bright green
  37. 51
  38. #ffff00
  39. 120
  40. 40

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