← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 222 · 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 hex code is yellow? (a) #ff00ff (b) #00ffff (c) #ff0000 (d) #ffff00
  2. 2.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
  3. 3.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) yellow (d) black
  4. 4.🌈 Which hex code is black? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #000000
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  6. 6.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #000000
  7. 7.🌈 In #00007b the blue part is the hex number 7b. What is it as a normal number?
  8. 8.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) cyan (d) bright green
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  10. 10.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) yellow (d) cyan
  11. 11.🌈 In #00d600 the green part is the hex number d6. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) cyan (d) black
  13. 13.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) red (c) blue (d) cyan
  14. 14.🌈 In #00005e the blue part is the hex number 5e. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) white (c) cyan (d) red
  16. 16.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
  17. 17.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #00ff00
  18. 18.🌈 Which colour of light is strongest in rgb(164, 66, 101)? (a) green (b) red (c) blue
  19. 19.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  20. 20.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) cyan (c) magenta (d) red
  21. 21.🌈 Which colour of light is strongest in rgb(164, 76, 28)? (a) blue (b) red (c) green
  22. 22.🌈 Which colour is #ff00ff? (a) black (b) yellow (c) red (d) magenta
  23. 23.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
  24. 24.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(75, 226, 139)? (a) green (b) blue (c) red
  26. 26.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  27. 27.🌈 In #490000 the red part is the hex number 49. What is it as a normal number?
  28. 28.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
  29. 29.🌈 Which colour is #ffffff? (a) white (b) red (c) cyan (d) yellow
  30. 30.🌈 In #550000 the red part is the hex number 55. What is it as a normal number?
  31. 31.🌈 In #c70000 the red part is the hex number c7. What is it as a normal number?
  32. 32.🌈 Which colour is #ffff00? (a) red (b) white (c) magenta (d) yellow
  33. 33.🌈 Which colour is #0000ff? (a) magenta (b) red (c) cyan (d) blue
  34. 34.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) red (d) cyan
  35. 35.🌈 Which colour of light is strongest in rgb(86, 38, 254)? (a) blue (b) green (c) red
  36. 36.🌈 Which colour of light is strongest in rgb(14, 114, 195)? (a) green (b) blue (c) red
  37. 37.🌈 In #003900 the green part is the hex number 39. What is it as a normal number?
  38. 38.🌈 Which colour is #000000? (a) blue (b) white (c) yellow (d) black
  39. 39.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #00ffff
  40. 40.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) magenta (d) black

Answer key

  1. #ffff00
  2. 67
  3. cyan
  4. #000000
  5. blue
  6. #ff00ff
  7. 123
  8. bright green
  9. F
  10. bright green
  11. 214
  12. white
  13. cyan
  14. 94
  15. red
  16. 1
  17. #00ff00
  18. red
  19. red
  20. magenta
  21. red
  22. magenta
  23. 3
  24. 153
  25. green
  26. 255
  27. 73
  28. 235
  29. white
  30. 85
  31. 199
  32. yellow
  33. blue
  34. blue
  35. blue
  36. blue
  37. 57
  38. black
  39. #00ffff
  40. black

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