← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 157 · 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.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  2. 2.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ffffff (d) #ff0000
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) bright green (d) magenta
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  5. 5.🌈 Which colour of light is strongest in rgb(44, 241, 93)? (a) red (b) green (c) blue
  6. 6.🌈 Which colour is #00ff00? (a) magenta (b) red (c) blue (d) bright green
  7. 7.🌈 Which colour of light is strongest in rgb(35, 167, 64)? (a) blue (b) red (c) green
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  9. 9.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #ff00ff
  10. 10.🌈 Which colour of light is strongest in rgb(55, 186, 8)? (a) red (b) green (c) blue
  11. 11.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) bright green (d) black
  13. 13.🌈 Which colour of light is strongest in rgb(183, 18, 122)? (a) green (b) blue (c) red
  14. 14.🌈 Which colour is #ffff00? (a) bright green (b) red (c) magenta (d) yellow
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
  16. 16.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) black (d) white
  17. 17.🌈 Which colour is #00ffff? (a) yellow (b) red (c) blue (d) cyan
  18. 18.🌈 Which colour is #ff00ff? (a) bright green (b) cyan (c) magenta (d) white
  19. 19.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #000000 (d) #ffffff
  20. 20.🌈 Which colour is #0000ff? (a) white (b) cyan (c) bright green (d) blue
  21. 21.🌈 Which hex code is blue? (a) #0000ff (b) #ff0000 (c) #ffff00 (d) #00ff00
  22. 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
  23. 23.🌈 Which colour of light is strongest in rgb(176, 134, 126)? (a) green (b) blue (c) red
  24. 24.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(10, 21, 159)? (a) blue (b) red (c) green
  26. 26.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
  27. 27.🌈 Which hex code is black? (a) #0000ff (b) #ffffff (c) #000000 (d) #00ff00
  28. 28.🌈 Which colour is #ffffff? (a) red (b) blue (c) white (d) cyan
  29. 29.🌈 Which colour of light is strongest in rgb(153, 127, 110)? (a) blue (b) green (c) red
  30. 30.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) white (d) cyan
  31. 31.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) blue (d) magenta
  33. 33.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) white (c) red (d) yellow
  34. 34.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) white (d) yellow
  35. 35.🌈 In #006a00 the green part is the hex number 6a. What is it as a normal number?
  36. 36.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #ffffff
  37. 37.🌈 Which colour of light is strongest in rgb(244, 26, 80)? (a) green (b) red (c) blue
  38. 38.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(56, 215, 124)? (a) blue (b) red (c) green
  40. 40.🌈 In #0000dd the blue part is the hex number dd. What is it as a normal number?

Answer key

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

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