← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 91 · 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) cyan (b) black (c) bright green (d) red
  2. 2.🌈 Which hex code is red? (a) #0000ff (b) #000000 (c) #ff0000 (d) #00ff00
  3. 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  4. 4.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #ff0000
  5. 5.🌈 Which colour of light is strongest in rgb(61, 30, 211)? (a) red (b) blue (c) green
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  7. 7.🌈 Which colour is #00ffff? (a) white (b) bright green (c) cyan (d) magenta
  8. 8.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #ff00ff
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  10. 10.🌈 Which colour of light is strongest in rgb(169, 9, 81)? (a) blue (b) red (c) green
  11. 11.🌈 Which colour of light is strongest in rgb(160, 79, 30)? (a) green (b) red (c) blue
  12. 12.🌈 Which colour is #000000? (a) yellow (b) white (c) black (d) bright green
  13. 13.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  14. 14.🌈 Which colour is #ffffff? (a) cyan (b) blue (c) white (d) bright green
  15. 15.🌈 Which colour of light is strongest in rgb(102, 30, 192)? (a) green (b) red (c) blue
  16. 16.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
  17. 17.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ffff00
  18. 18.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) white (d) blue
  19. 19.🌈 Which colour of light is strongest in rgb(126, 176, 12)? (a) blue (b) green (c) red
  20. 20.🌈 Which colour of light is strongest in rgb(125, 9, 215)? (a) blue (b) red (c) green
  21. 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  22. 22.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) yellow (d) bright green
  23. 23.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(59, 172, 69)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) yellow (c) black (d) white
  26. 26.🌈 In #004200 the green part is the hex number 42. What is it as a normal number?
  27. 27.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(9, 155, 138)? (a) blue (b) green (c) red
  29. 29.🌈 Which colour is #00ff00? (a) bright green (b) red (c) white (d) black
  30. 30.🌈 Which colour is #0000ff? (a) black (b) blue (c) magenta (d) bright green
  31. 31.🌈 Which colour is #ffff00? (a) cyan (b) red (c) yellow (d) magenta
  32. 32.🌈 Which colour is #ff0000? (a) yellow (b) magenta (c) cyan (d) red
  33. 33.🌈 Which colour of light is strongest in rgb(179, 115, 68)? (a) red (b) blue (c) green
  34. 34.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(40, 76, 247)? (a) green (b) blue (c) red
  36. 36.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #00ffff (d) #ffff00
  37. 37.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) blue (c) red (d) magenta
  38. 38.🌈 In #00008f the blue part is the hex number 8f. What is it as a normal number?
  39. 39.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(138, 205, 65)? (a) green (b) blue (c) red

Answer key

  1. bright green
  2. #ff0000
  3. 3
  4. #00ff00
  5. blue
  6. red
  7. cyan
  8. #0000ff
  9. blue
  10. red
  11. red
  12. black
  13. 75
  14. white
  15. blue
  16. 218
  17. #ff00ff
  18. blue
  19. green
  20. blue
  21. 255
  22. magenta
  23. 78
  24. green
  25. black
  26. 66
  27. 40
  28. green
  29. bright green
  30. blue
  31. yellow
  32. red
  33. red
  34. 92
  35. blue
  36. #000000
  37. red
  38. 143
  39. 8
  40. green

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