← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 121 · 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 of light is strongest in rgb(235, 98, 131)? (a) green (b) red (c) blue
  2. 2.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #00ff00 (d) #0000ff
  3. 3.🌈 Which colour of light is strongest in rgb(245, 123, 62)? (a) blue (b) green (c) red
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  5. 5.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) yellow
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  7. 7.🌈 Which hex code is red? (a) #000000 (b) #ffffff (c) #ff00ff (d) #ff0000
  8. 8.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) red (d) cyan
  9. 9.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) yellow (d) red
  10. 10.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
  11. 11.🌈 Which colour of light is strongest in rgb(198, 55, 17)? (a) red (b) blue (c) green
  12. 12.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) white (d) yellow
  13. 13.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) blue (d) bright green
  14. 14.🌈 Which colour is #ffffff? (a) red (b) white (c) black (d) cyan
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
  16. 16.🌈 Which colour is #000000? (a) bright green (b) yellow (c) black (d) blue
  17. 17.🌈 Which colour of light is strongest in rgb(10, 195, 96)? (a) blue (b) green (c) red
  18. 18.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) yellow (d) red
  19. 19.🌈 In #00007e the blue part is the hex number 7e. What is it as a normal number?
  20. 20.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #0000ff (d) #ffff00
  21. 21.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #ff0000 (d) #ffff00
  22. 22.🌈 Which colour of light is strongest in rgb(106, 155, 5)? (a) blue (b) green (c) red
  23. 23.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  24. 24.🌈 In #ea0000 the red part is the hex number ea. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) magenta (c) white (d) bright green
  26. 26.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #ffffff
  27. 27.🌈 In #d80000 the red part is the hex number d8. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(132, 60, 221)? (a) red (b) green (c) blue
  29. 29.🌈 Which colour is #ffff00? (a) white (b) cyan (c) blue (d) yellow
  30. 30.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #00ffff (d) #00ff00
  31. 31.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) magenta (c) bright green (d) yellow
  32. 32.🌈 Which hex code is cyan? (a) #000000 (b) #0000ff (c) #00ff00 (d) #00ffff
  33. 33.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) yellow (c) white (d) magenta
  34. 34.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
  35. 35.🌈 In #000700 the green part is the hex number 07. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(237, 51, 123)? (a) green (b) red (c) blue
  37. 37.🌈 Which colour of light is strongest in rgb(33, 131, 159)? (a) green (b) red (c) blue
  38. 38.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(130, 160, 65)? (a) blue (b) green (c) red
  40. 40.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J

Answer key

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

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