← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 146 · 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) black (b) magenta (c) white (d) blue
  2. 2.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #000000
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) bright green (d) blue
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) magenta (c) red (d) yellow
  5. 5.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
  6. 6.🌈 Which colour of light is strongest in rgb(185, 33, 14)? (a) red (b) blue (c) green
  7. 7.🌈 Which colour of light is strongest in rgb(44, 64, 222)? (a) blue (b) green (c) red
  8. 8.🌈 Which hex code is blue? (a) #ffffff (b) #00ffff (c) #0000ff (d) #ffff00
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  10. 10.🌈 In #000040 the blue part is the hex number 40. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) cyan (c) magenta (d) white
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  13. 13.🌈 Which hex code is cyan? (a) #000000 (b) #ffff00 (c) #0000ff (d) #00ffff
  14. 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  15. 15.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #000000
  16. 16.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) black (d) cyan
  17. 17.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  18. 18.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) red (c) bright green (d) black
  19. 19.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) magenta (c) bright green (d) cyan
  20. 20.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) yellow (d) bright green
  21. 21.🌈 In #0000e8 the blue part is the hex number e8. What is it as a normal number?
  22. 22.🌈 In #930000 the red part is the hex number 93. What is it as a normal number?
  23. 23.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(40, 45, 198)? (a) blue (b) red (c) green
  25. 25.🌈 Which colour of light is strongest in rgb(53, 181, 39)? (a) red (b) blue (c) green
  26. 26.🌈 Which colour is #00ff00? (a) cyan (b) white (c) black (d) bright green
  27. 27.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(221, 14, 48)? (a) red (b) green (c) blue
  29. 29.🌈 Which colour is #ff0000? (a) cyan (b) red (c) bright green (d) yellow
  30. 30.🌈 Which colour is #ffff00? (a) blue (b) white (c) cyan (d) yellow
  31. 31.🌈 Which colour of light is strongest in rgb(6, 204, 117)? (a) red (b) blue (c) green
  32. 32.🌈 Which hex code is white? (a) #00ffff (b) #0000ff (c) #ffffff (d) #000000
  33. 33.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
  34. 34.🌈 In #000045 the blue part is the hex number 45. What is it as a normal number?
  35. 35.🌈 Which hex code is black? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #000000
  36. 36.🌈 Which colour of light is strongest in rgb(126, 201, 26)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour is #000000? (a) bright green (b) cyan (c) black (d) magenta
  38. 38.🌈 Which colour of light is strongest in rgb(75, 127, 239)? (a) red (b) blue (c) green
  39. 39.🌈 Which colour of light is strongest in rgb(91, 223, 102)? (a) blue (b) green (c) red
  40. 40.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?

Answer key

  1. blue
  2. #ff00ff
  3. cyan
  4. yellow
  5. 81
  6. red
  7. blue
  8. #0000ff
  9. blue
  10. 64
  11. magenta
  12. F
  13. #00ffff
  14. 3
  15. #ff0000
  16. magenta
  17. 255
  18. red
  19. bright green
  20. blue
  21. 232
  22. 147
  23. 156
  24. blue
  25. green
  26. bright green
  27. 217
  28. red
  29. red
  30. yellow
  31. green
  32. #ffffff
  33. 195
  34. 69
  35. #000000
  36. green
  37. black
  38. blue
  39. green
  40. 5

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