← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 214 · 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 #ffff00? (a) yellow (b) white (c) bright green (d) black
  2. 2.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
  3. 3.🌈 Which colour is #ff00ff? (a) yellow (b) bright green (c) cyan (d) magenta
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  6. 6.🌈 Which hex code is black? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #000000
  7. 7.🌈 Which colour of light is strongest in rgb(174, 136, 111)? (a) green (b) red (c) blue
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
  9. 9.🌈 Which colour of light is strongest in rgb(175, 8, 82)? (a) blue (b) green (c) red
  10. 10.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) black (d) yellow
  11. 11.🌈 Which colour is #ff0000? (a) blue (b) red (c) yellow (d) bright green
  12. 12.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
  14. 14.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) cyan (c) black (d) blue
  15. 15.🌈 Which hex code is blue? (a) #ff00ff (b) #0000ff (c) #ffff00 (d) #ff0000
  16. 16.🌈 Which colour of light is strongest in rgb(11, 178, 84)? (a) green (b) red (c) blue
  17. 17.🌈 Which colour of light is strongest in rgb(167, 6, 92)? (a) blue (b) red (c) green
  18. 18.🌈 Which colour of light is strongest in rgb(76, 220, 31)? (a) red (b) blue (c) green
  19. 19.🌈 Which hex code is bright green? (a) #ffffff (b) #000000 (c) #00ff00 (d) #00ffff
  20. 20.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) cyan
  21. 21.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) cyan (d) yellow
  22. 22.🌈 Which colour of light is strongest in rgb(209, 4, 0)? (a) green (b) blue (c) red
  23. 23.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ff00 (c) #ff0000 (d) #ffffff
  24. 24.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) black (d) red
  25. 25.🌈 Which colour of light is strongest in rgb(90, 23, 228)? (a) blue (b) green (c) red
  26. 26.🌈 Which colour of light is strongest in rgb(125, 9, 160)? (a) red (b) green (c) blue
  27. 27.🌈 Which colour is #ffffff? (a) bright green (b) white (c) cyan (d) blue
  28. 28.🌈 In #0000c7 the blue part is the hex number c7. What is it as a normal number?
  29. 29.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) yellow (c) cyan (d) bright green
  30. 30.🌈 Which colour of light is strongest in rgb(14, 150, 30)? (a) blue (b) green (c) red
  31. 31.🌈 Which colour of light is strongest in rgb(220, 129, 4)? (a) red (b) green (c) blue
  32. 32.🌈 In #000025 the blue part is the hex number 25. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) magenta (d) yellow
  34. 34.🌈 In #bd0000 the red part is the hex number bd. What is it as a normal number?
  35. 35.🌈 Which hex code is red? (a) #00ff00 (b) #ffffff (c) #00ffff (d) #ff0000
  36. 36.🌈 Which colour of light is strongest in rgb(159, 60, 132)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(82, 122, 184)? (a) red (b) green (c) blue
  38. 38.🌈 Which colour of light is strongest in rgb(59, 92, 231)? (a) green (b) red (c) blue
  39. 39.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) magenta (c) cyan (d) yellow
  40. 40.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4

Answer key

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

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