← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 317 · 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, 255)? (a) cyan (b) black (c) white (d) blue
  2. 2.🌈 Which colour is #000000? (a) white (b) blue (c) black (d) yellow
  3. 3.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) red (d) yellow
  4. 4.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #00ff00
  5. 5.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) black (c) white (d) blue
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  7. 7.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) magenta (c) red (d) black
  9. 9.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) black (d) white
  10. 10.🌈 Which colour of light is strongest in rgb(22, 28, 192)? (a) red (b) green (c) blue
  11. 11.🌈 Which colour of light is strongest in rgb(255, 67, 66)? (a) green (b) red (c) blue
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  13. 13.🌈 Which colour is #00ff00? (a) red (b) bright green (c) yellow (d) magenta
  14. 14.🌈 In #000600 the green part is the hex number 06. What is it as a normal number?
  15. 15.🌈 Which colour is #ffffff? (a) cyan (b) blue (c) black (d) white
  16. 16.🌈 In #000000 the green part is the hex number 00. What is it as a normal number?
  17. 17.🌈 In #5f0000 the red part is the hex number 5f. What is it as a normal number?
  18. 18.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) red (d) black
  19. 19.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) magenta (d) black
  20. 20.🌈 Which colour of light is strongest in rgb(230, 13, 18)? (a) red (b) green (c) blue
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  22. 22.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
  23. 23.🌈 In #9a0000 the red part is the hex number 9a. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(160, 9, 37)? (a) green (b) blue (c) red
  25. 25.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
  26. 26.🌈 Which hex code is red? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #000000
  27. 27.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
  28. 28.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
  29. 29.🌈 Which colour of light is strongest in rgb(161, 133, 55)? (a) blue (b) green (c) red
  30. 30.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) blue (c) magenta (d) red
  31. 31.🌈 In #e80000 the red part is the hex number e8. What is it as a normal number?
  32. 32.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  33. 33.🌈 Which colour of light is strongest in rgb(162, 6, 84)? (a) green (b) red (c) blue
  34. 34.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
  35. 35.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #00ffff
  36. 36.🌈 Which hex code is blue? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #000000
  37. 37.🌈 Which colour is #ff0000? (a) yellow (b) red (c) magenta (d) bright green
  38. 38.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) white (c) yellow (d) red
  39. 39.🌈 Which hex code is black? (a) #ffff00 (b) #0000ff (c) #00ff00 (d) #000000
  40. 40.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) white (c) blue (d) bright green

Answer key

  1. cyan
  2. black
  3. bright green
  4. #ffff00
  5. white
  6. F
  7. 241
  8. black
  9. red
  10. blue
  11. red
  12. 255
  13. bright green
  14. 6
  15. white
  16. 0
  17. 95
  18. blue
  19. cyan
  20. red
  21. 3
  22. 195
  23. 154
  24. red
  25. 190
  26. #ff0000
  27. 129
  28. blue
  29. red
  30. magenta
  31. 232
  32. red
  33. red
  34. 75
  35. #00ffff
  36. #0000ff
  37. red
  38. yellow
  39. #000000
  40. blue

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