← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 120 · 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 #0000ff? (a) magenta (b) blue (c) red (d) white
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  5. 5.🌈 Which colour of light is strongest in rgb(69, 188, 104)? (a) red (b) green (c) blue
  6. 6.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
  7. 7.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff0000 (d) #ff00ff
  8. 8.🌈 Which colour is #ff0000? (a) magenta (b) white (c) red (d) cyan
  9. 9.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) black (d) blue
  10. 10.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
  11. 11.🌈 In #00e600 the green part is the hex number e6. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) white (d) black
  13. 13.🌈 Which colour of light is strongest in rgb(136, 233, 63)? (a) red (b) green (c) blue
  14. 14.🌈 Which colour of light is strongest in rgb(109, 97, 158)? (a) green (b) blue (c) red
  15. 15.🌈 Which colour of light is strongest in rgb(70, 205, 67)? (a) blue (b) red (c) green
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) red (d) yellow
  17. 17.🌈 Which colour is #000000? (a) white (b) magenta (c) cyan (d) black
  18. 18.🌈 Which colour of light is strongest in rgb(83, 21, 255)? (a) blue (b) red (c) green
  19. 19.🌈 In #000b00 the green part is the hex number 0b. What is it as a normal number?
  20. 20.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) cyan (d) red
  21. 21.🌈 Which colour is #ffff00? (a) black (b) cyan (c) yellow (d) white
  22. 22.🌈 Which colour of light is strongest in rgb(99, 20, 239)? (a) green (b) red (c) blue
  23. 23.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) white (d) black
  25. 25.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) red (d) blue
  26. 26.🌈 Which colour of light is strongest in rgb(188, 132, 135)? (a) green (b) red (c) blue
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  28. 28.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) white (d) blue
  29. 29.🌈 Which hex code is bright green? (a) #000000 (b) #ff00ff (c) #00ff00 (d) #ffffff
  30. 30.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff00ff (c) #ffffff (d) #ff0000
  31. 31.🌈 Which colour of light is strongest in rgb(215, 71, 22)? (a) green (b) blue (c) red
  32. 32.🌈 In #8e0000 the red part is the hex number 8e. What is it as a normal number?
  33. 33.🌈 Which hex code is cyan? (a) #ffffff (b) #ff0000 (c) #00ffff (d) #0000ff
  34. 34.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #0000ff (d) #00ffff
  35. 35.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
  36. 36.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
  37. 37.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
  38. 38.🌈 In #0000df the blue part is the hex number df. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(11, 160, 42)? (a) blue (b) green (c) red
  40. 40.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) cyan (c) bright green (d) yellow

Answer key

  1. blue
  2. blue
  3. red
  4. 255
  5. green
  6. 48
  7. #0000ff
  8. red
  9. magenta
  10. 11
  11. 230
  12. yellow
  13. green
  14. blue
  15. green
  16. blue
  17. black
  18. blue
  19. 11
  20. magenta
  21. yellow
  22. blue
  23. 163
  24. white
  25. bright green
  26. red
  27. 3
  28. bright green
  29. #00ff00
  30. #ff00ff
  31. red
  32. 142
  33. #00ffff
  34. #000000
  35. 250
  36. 206
  37. 65
  38. 223
  39. green
  40. red

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