← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 180 · 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(255, 255, 0)? (a) white (b) blue (c) cyan (d) yellow
  2. 2.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #000000
  3. 3.🌈 Which colour is #ff00ff? (a) white (b) red (c) magenta (d) yellow
  4. 4.🌈 Which hex code is magenta? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ffff
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  6. 6.🌈 Which hex code is red? (a) #ffffff (b) #000000 (c) #ff0000 (d) #00ff00
  7. 7.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) white
  8. 8.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) black (c) red (d) blue
  9. 9.🌈 Which colour of light is strongest in rgb(226, 86, 25)? (a) green (b) red (c) blue
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  12. 12.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) magenta (c) bright green (d) cyan
  13. 13.🌈 In #00bf00 the green part is the hex number bf. What is it as a normal number?
  14. 14.🌈 Which colour of light is strongest in rgb(116, 186, 81)? (a) blue (b) red (c) green
  15. 15.🌈 In #8a0000 the red part is the hex number 8a. What is it as a normal number?
  16. 16.🌈 Which hex code is cyan? (a) #ffffff (b) #ff0000 (c) #0000ff (d) #00ffff
  17. 17.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ffff
  18. 18.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
  19. 19.🌈 Which hex code is bright green? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ff00ff
  20. 20.🌈 In #270000 the red part is the hex number 27. What is it as a normal number?
  21. 21.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
  22. 22.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) cyan
  23. 23.🌈 Which colour is #0000ff? (a) white (b) cyan (c) bright green (d) blue
  24. 24.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) blue (d) magenta
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) white (d) black
  26. 26.🌈 Which colour is #00ffff? (a) blue (b) bright green (c) red (d) cyan
  27. 27.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) white (d) blue
  28. 28.🌈 Which colour is #000000? (a) black (b) magenta (c) cyan (d) white
  29. 29.🌈 In #006b00 the green part is the hex number 6b. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(64, 242, 56)? (a) red (b) blue (c) green
  31. 31.🌈 Which colour of light is strongest in rgb(72, 58, 252)? (a) green (b) red (c) blue
  32. 32.🌈 Which colour of light is strongest in rgb(48, 70, 191)? (a) red (b) blue (c) green
  33. 33.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) bright green (d) white
  34. 34.🌈 Which colour of light is strongest in rgb(140, 230, 133)? (a) blue (b) red (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(153, 61, 39)? (a) green (b) blue (c) red
  36. 36.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  37. 37.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
  38. 38.🌈 Which colour is #ff0000? (a) bright green (b) red (c) magenta (d) yellow
  39. 39.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(122, 83, 240)? (a) blue (b) green (c) red

Answer key

  1. yellow
  2. #ffff00
  3. magenta
  4. #ff00ff
  5. red
  6. #ff0000
  7. bright green
  8. red
  9. red
  10. 255
  11. F
  12. bright green
  13. 191
  14. green
  15. 138
  16. #00ffff
  17. #ffffff
  18. 218
  19. #00ff00
  20. 39
  21. blue
  22. yellow
  23. blue
  24. white
  25. blue
  26. cyan
  27. white
  28. black
  29. 107
  30. green
  31. blue
  32. blue
  33. black
  34. green
  35. red
  36. 3
  37. 242
  38. red
  39. 6
  40. blue

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