← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 88 · 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 #ff00ff? (a) black (b) white (c) blue (d) magenta
  2. 2.🌈 Which hex code is red? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #ff0000
  3. 3.🌈 Which colour of light is strongest in rgb(30, 230, 131)? (a) red (b) blue (c) green
  4. 4.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #00ff00
  5. 5.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) magenta (d) blue
  6. 6.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  8. 8.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  10. 10.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) yellow (c) cyan (d) bright green
  11. 11.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) white (d) red
  12. 12.🌈 Which hex code is yellow? (a) #ff00ff (b) #000000 (c) #ffffff (d) #ffff00
  13. 13.🌈 Which colour of light is strongest in rgb(162, 32, 97)? (a) red (b) green (c) blue
  14. 14.🌈 Which colour of light is strongest in rgb(46, 151, 1)? (a) green (b) blue (c) red
  15. 15.🌈 Which colour of light is strongest in rgb(126, 40, 208)? (a) red (b) green (c) blue
  16. 16.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) yellow (d) red
  17. 17.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) black (c) red (d) white
  18. 18.🌈 In #0000d1 the blue part is the hex number d1. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(5, 88, 226)? (a) blue (b) green (c) red
  20. 20.🌈 Which hex code is black? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #00ff00
  21. 21.🌈 Which colour of light is strongest in rgb(179, 113, 129)? (a) green (b) red (c) blue
  22. 22.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
  23. 23.🌈 Which colour is #000000? (a) blue (b) white (c) black (d) yellow
  24. 24.🌈 Which colour is #ff0000? (a) bright green (b) red (c) black (d) cyan
  25. 25.🌈 Which colour is #00ff00? (a) red (b) black (c) blue (d) bright green
  26. 26.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(23, 237, 18)? (a) blue (b) red (c) green
  28. 28.🌈 Which colour of light is strongest in rgb(250, 4, 80)? (a) blue (b) green (c) red
  29. 29.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) black (d) blue
  30. 30.🌈 Which colour of light is strongest in rgb(0, 176, 16)? (a) blue (b) green (c) red
  31. 31.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff0000 (c) #ffff00 (d) #00ffff
  32. 32.🌈 Which colour of light is strongest in rgb(21, 170, 9)? (a) blue (b) green (c) red
  33. 33.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
  34. 34.🌈 In #0000c7 the blue part is the hex number c7. What is it as a normal number?
  35. 35.🌈 In #c20000 the red part is the hex number c2. What is it as a normal number?
  36. 36.🌈 In #0000b5 the blue part is the hex number b5. What is it as a normal number?
  37. 37.🌈 In #000000 the red part is the hex number 00. What is it as a normal number?
  38. 38.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) blue (c) cyan (d) bright green
  39. 39.🌈 Which colour is #ffffff? (a) bright green (b) red (c) magenta (d) white
  40. 40.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?

Answer key

  1. magenta
  2. #ff0000
  3. green
  4. #00ff00
  5. magenta
  6. red
  7. 3
  8. 255
  9. blue
  10. yellow
  11. red
  12. #ffff00
  13. red
  14. green
  15. blue
  16. blue
  17. white
  18. 209
  19. blue
  20. #000000
  21. red
  22. 225
  23. black
  24. red
  25. bright green
  26. 11
  27. green
  28. red
  29. cyan
  30. green
  31. #00ffff
  32. green
  33. F
  34. 199
  35. 194
  36. 181
  37. 0
  38. cyan
  39. white
  40. 205

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