← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 19 · 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 #ff0000? (a) cyan (b) magenta (c) black (d) red
  2. 2.🌈 Which colour is #ffff00? (a) cyan (b) red (c) bright green (d) yellow
  3. 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  4. 4.🌈 Which colour is #000000? (a) magenta (b) bright green (c) black (d) white
  5. 5.🌈 Which colour is #0000ff? (a) cyan (b) white (c) blue (d) black
  6. 6.🌈 In #170000 the red part is the hex number 17. What is it as a normal number?
  7. 7.🌈 In #00dd00 the green part is the hex number dd. What is it as a normal number?
  8. 8.🌈 Which colour of light is strongest in rgb(198, 18, 74)? (a) red (b) blue (c) green
  9. 9.🌈 Which colour is #00ffff? (a) bright green (b) black (c) cyan (d) red
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
  11. 11.🌈 Which hex code is white? (a) #00ffff (b) #0000ff (c) #ffffff (d) #ff0000
  12. 12.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #00ff00
  13. 13.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) red (c) blue (d) black
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  15. 15.🌈 Which hex code is bright green? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #0000ff
  16. 16.🌈 Which colour of light is strongest in rgb(182, 46, 109)? (a) red (b) green (c) blue
  17. 17.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  18. 18.🌈 Which colour of light is strongest in rgb(172, 78, 33)? (a) blue (b) green (c) red
  19. 19.🌈 In #00004f the blue part is the hex number 4f. What is it as a normal number?
  20. 20.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) red (d) black
  21. 21.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) yellow (c) magenta (d) blue
  22. 22.🌈 Which hex code is cyan? (a) #ffffff (b) #0000ff (c) #00ffff (d) #00ff00
  23. 23.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
  24. 24.🌈 Which colour of light is strongest in rgb(31, 215, 22)? (a) blue (b) red (c) green
  25. 25.🌈 In #009000 the green part is the hex number 90. What is it as a normal number?
  26. 26.🌈 In #00ce00 the green part is the hex number ce. What is it as a normal number?
  27. 27.🌈 Which colour is #ff00ff? (a) white (b) black (c) bright green (d) magenta
  28. 28.🌈 Which colour of light is strongest in rgb(97, 7, 199)? (a) red (b) green (c) blue
  29. 29.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) black (d) bright green
  30. 30.🌈 In #000800 the green part is the hex number 08. What is it as a normal number?
  31. 31.🌈 In #000022 the blue part is the hex number 22. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(188, 77, 29)? (a) blue (b) red (c) green
  33. 33.🌈 Which colour of light is strongest in rgb(232, 69, 54)? (a) green (b) red (c) blue
  34. 34.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
  35. 35.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) black (c) white (d) cyan
  36. 36.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) white (c) blue (d) black
  37. 37.🌈 Which colour of light is strongest in rgb(223, 29, 64)? (a) green (b) blue (c) red
  38. 38.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #000000 (d) #ff00ff
  39. 39.🌈 In #e80000 the red part is the hex number e8. What is it as a normal number?
  40. 40.🌈 In #0000ea the blue part is the hex number ea. What is it as a normal number?

Answer key

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

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