← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 90 · 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 bright green? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #00ffff
  2. 2.🌈 In #8a0000 the red part is the hex number 8a. What is it as a normal number?
  3. 3.🌈 Which colour of light is strongest in rgb(167, 7, 105)? (a) blue (b) green (c) red
  4. 4.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) bright green (c) blue (d) black
  5. 5.🌈 In #009300 the green part is the hex number 93. What is it as a normal number?
  6. 6.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #00ffff
  7. 7.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) magenta (c) bright green (d) yellow
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  10. 10.🌈 In #00003d the blue part is the hex number 3d. What is it as a normal number?
  11. 11.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
  12. 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  14. 14.🌈 In #008300 the green part is the hex number 83. What is it as a normal number?
  15. 15.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) yellow (d) magenta
  17. 17.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #00ff00
  18. 18.🌈 Which colour is #ffff00? (a) black (b) red (c) bright green (d) yellow
  19. 19.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #ff00ff
  20. 20.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) white (c) blue (d) yellow
  21. 21.🌈 Which colour is #000000? (a) black (b) magenta (c) yellow (d) bright green
  22. 22.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
  23. 23.🌈 Which colour is #00ff00? (a) blue (b) white (c) magenta (d) bright green
  24. 24.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #000000
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) cyan (c) black (d) blue
  26. 26.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) blue (d) bright green
  27. 27.🌈 Which hex code is blue? (a) #000000 (b) #00ff00 (c) #0000ff (d) #ff0000
  28. 28.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) blue (c) magenta (d) white
  29. 29.🌈 Which colour is #ff00ff? (a) black (b) white (c) magenta (d) cyan
  30. 30.🌈 Which colour of light is strongest in rgb(123, 123, 214)? (a) green (b) red (c) blue
  31. 31.🌈 In #0000af the blue part is the hex number af. What is it as a normal number?
  32. 32.🌈 In #c50000 the red part is the hex number c5. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) blue (c) yellow (d) white
  34. 34.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(1, 87, 173)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour is #ffffff? (a) magenta (b) cyan (c) white (d) blue
  37. 37.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(27, 93, 237)? (a) green (b) blue (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(249, 38, 28)? (a) blue (b) red (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(251, 40, 126)? (a) red (b) blue (c) green

Answer key

  1. #00ff00
  2. 138
  3. red
  4. black
  5. 147
  6. #ffffff
  7. cyan
  8. red
  9. blue
  10. 61
  11. 18
  12. 3
  13. F
  14. 131
  15. 57
  16. bright green
  17. #00ffff
  18. yellow
  19. #000000
  20. yellow
  21. black
  22. 205
  23. bright green
  24. #ffff00
  25. blue
  26. cyan
  27. #0000ff
  28. magenta
  29. magenta
  30. blue
  31. 175
  32. 197
  33. white
  34. 246
  35. blue
  36. white
  37. 59
  38. blue
  39. red
  40. red

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