← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 353 · 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, 0, 0)? (a) red (b) bright green (c) blue (d) white
  2. 2.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #ff00ff
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  4. 4.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) yellow (c) magenta (d) blue
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  6. 6.🌈 Which colour is #ff0000? (a) red (b) cyan (c) magenta (d) black
  7. 7.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) cyan (c) red (d) white
  8. 8.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?
  9. 9.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  11. 11.🌈 Which colour of light is strongest in rgb(216, 116, 35)? (a) blue (b) green (c) red
  12. 12.🌈 Which hex code is cyan? (a) #00ffff (b) #ffffff (c) #ffff00 (d) #0000ff
  13. 13.🌈 Which colour of light is strongest in rgb(3, 230, 73)? (a) blue (b) red (c) green
  14. 14.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffff00 (c) #000000 (d) #0000ff
  15. 15.🌈 Which hex code is blue? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ffffff
  16. 16.🌈 Which colour is #0000ff? (a) yellow (b) white (c) blue (d) magenta
  17. 17.🌈 Which colour of light is strongest in rgb(69, 55, 248)? (a) red (b) blue (c) green
  18. 18.🌈 In #006600 the green part is the hex number 66. What is it as a normal number?
  19. 19.🌈 In #000031 the blue part is the hex number 31. What is it as a normal number?
  20. 20.🌈 Which colour of light is strongest in rgb(15, 139, 187)? (a) green (b) red (c) blue
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
  22. 22.🌈 Which colour is #ffffff? (a) yellow (b) white (c) black (d) bright green
  23. 23.🌈 Which hex code is red? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #ffffff
  24. 24.🌈 Which colour of light is strongest in rgb(18, 221, 7)? (a) red (b) blue (c) green
  25. 25.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) white (c) blue (d) yellow
  26. 26.🌈 Which colour of light is strongest in rgb(176, 17, 112)? (a) red (b) green (c) blue
  27. 27.🌈 In #006c00 the green part is the hex number 6c. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) bright green (d) black
  29. 29.🌈 In #00a100 the green part is the hex number a1. What is it as a normal number?
  30. 30.🌈 Which colour is #ffff00? (a) red (b) bright green (c) yellow (d) white
  31. 31.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
  32. 32.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
  33. 33.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
  34. 34.🌈 In #003400 the green part is the hex number 34. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(56, 173, 16)? (a) green (b) blue (c) red
  36. 36.🌈 Which colour is #00ffff? (a) bright green (b) yellow (c) magenta (d) cyan
  37. 37.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
  38. 38.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) magenta (d) black
  39. 39.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) cyan (d) white
  40. 40.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff0000 (c) #ff00ff (d) #ffff00

Answer key

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

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