← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 41 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  2. 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #0000ff
  3. 3.🌈 Which hex code is white? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #ffffff
  4. 4.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) blue (c) red (d) white
  5. 5.🌈 In #00002d the blue part is the hex number 2d. What is it as a normal number?
  6. 6.🌈 Which colour is #0000ff? (a) red (b) cyan (c) blue (d) yellow
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  8. 8.🌈 Which colour is #00ffff? (a) black (b) cyan (c) white (d) yellow
  9. 9.🌈 Which colour of light is strongest in rgb(43, 186, 31)? (a) red (b) green (c) blue
  10. 10.🌈 Which colour is #ffffff? (a) blue (b) red (c) cyan (d) white
  11. 11.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) bright green (d) white
  12. 12.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  13. 13.🌈 Which colour of light is strongest in rgb(255, 29, 13)? (a) red (b) blue (c) green
  14. 14.🌈 In #0000f4 the blue part is the hex number f4. What is it as a normal number?
  15. 15.🌈 Which colour of light is strongest in rgb(155, 59, 132)? (a) red (b) green (c) blue
  16. 16.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
  17. 17.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  18. 18.🌈 Which colour is #ff0000? (a) red (b) bright green (c) cyan (d) blue
  19. 19.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #ff0000 (d) #ff00ff
  20. 20.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) cyan (c) blue (d) magenta
  21. 21.🌈 Which hex code is red? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #0000ff
  22. 22.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) yellow (d) cyan
  23. 23.🌈 Which colour of light is strongest in rgb(113, 114, 174)? (a) green (b) blue (c) red
  24. 24.🌈 Which colour of light is strongest in rgb(138, 137, 243)? (a) red (b) green (c) blue
  25. 25.🌈 Which colour of light is strongest in rgb(94, 164, 121)? (a) red (b) green (c) blue
  26. 26.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) blue (d) black
  27. 27.🌈 Which colour is #00ff00? (a) blue (b) black (c) bright green (d) yellow
  28. 28.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) yellow (d) cyan
  29. 29.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) magenta (c) red (d) blue
  30. 30.🌈 Which colour of light is strongest in rgb(14, 237, 111)? (a) red (b) blue (c) green
  31. 31.🌈 Which colour is #ff00ff? (a) red (b) black (c) yellow (d) magenta
  32. 32.🌈 Which colour of light is strongest in rgb(255, 97, 110)? (a) blue (b) green (c) red
  33. 33.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #00ff00
  34. 34.🌈 Which colour of light is strongest in rgb(210, 107, 101)? (a) red (b) blue (c) green
  35. 35.🌈 Which hex code is bright green? (a) #0000ff (b) #ffff00 (c) #00ff00 (d) #ff00ff
  36. 36.🌈 Which colour of light is strongest in rgb(158, 33, 4)? (a) blue (b) green (c) red
  37. 37.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
  38. 38.🌈 In #0000b9 the blue part is the hex number b9. What is it as a normal number?
  39. 39.🌈 In #00008b the blue part is the hex number 8b. What is it as a normal number?
  40. 40.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffff00 (c) #0000ff (d) #00ffff

Answer key

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

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