← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 202 · 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 rgb(255, 0, 255)? (a) black (b) magenta (c) red (d) blue
  2. 2.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) cyan (c) bright green (d) black
  3. 3.🌈 In #910000 the red part is the hex number 91. What is it as a normal number?
  4. 4.🌈 Which colour is #ffffff? (a) magenta (b) red (c) white (d) yellow
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  8. 8.🌈 Which colour is #ff00ff? (a) bright green (b) black (c) cyan (d) magenta
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  10. 10.🌈 Which hex code is magenta? (a) #00ffff (b) #000000 (c) #00ff00 (d) #ff00ff
  11. 11.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(114, 20, 220)? (a) blue (b) green (c) red
  13. 13.🌈 In #0000f0 the blue part is the hex number f0. What is it as a normal number?
  14. 14.🌈 Which colour of light is strongest in rgb(158, 15, 38)? (a) red (b) blue (c) green
  15. 15.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
  16. 16.🌈 In #00003d the blue part is the hex number 3d. What is it as a normal number?
  17. 17.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
  18. 18.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) white (d) green
  19. 19.🌈 In #0000be the blue part is the hex number be. What is it as a normal number?
  20. 20.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) white (d) cyan
  21. 21.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) red (c) magenta (d) white
  22. 22.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #00ff00 (d) #ffffff
  23. 23.🌈 Which colour is #00ffff? (a) red (b) bright green (c) magenta (d) cyan
  24. 24.🌈 Which colour of light is strongest in rgb(123, 115, 175)? (a) green (b) blue (c) red
  25. 25.🌈 In #0000a3 the blue part is the hex number a3. What is it as a normal number?
  26. 26.🌈 In #2b0000 the red part is the hex number 2b. What is it as a normal number?
  27. 27.🌈 Which hex code is white? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #ffffff
  28. 28.🌈 Which colour of light is strongest in rgb(171, 126, 105)? (a) blue (b) green (c) red
  29. 29.🌈 In #570000 the red part is the hex number 57. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(213, 43, 0)? (a) green (b) blue (c) red
  31. 31.🌈 Which colour of light is strongest in rgb(245, 98, 121)? (a) green (b) blue (c) red
  32. 32.🌈 Which colour is #ff0000? (a) yellow (b) black (c) white (d) red
  33. 33.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) bright green (d) magenta
  34. 34.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) bright green (d) white
  35. 35.🌈 Which colour of light is strongest in rgb(171, 122, 28)? (a) red (b) blue (c) green
  36. 36.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
  37. 37.🌈 In #001c00 the green part is the hex number 1c. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(222, 0, 101)? (a) green (b) blue (c) red
  39. 39.🌈 Which colour is #0000ff? (a) blue (b) red (c) magenta (d) cyan
  40. 40.🌈 Which colour of light is strongest in rgb(249, 117, 50)? (a) blue (b) green (c) red

Answer key

  1. magenta
  2. black
  3. 145
  4. white
  5. 3
  6. F
  7. red
  8. magenta
  9. 255
  10. #ff00ff
  11. 172
  12. blue
  13. 240
  14. red
  15. 40
  16. 61
  17. 75
  18. blue
  19. 190
  20. blue
  21. white
  22. #00ff00
  23. cyan
  24. blue
  25. 163
  26. 43
  27. #ffffff
  28. red
  29. 87
  30. red
  31. red
  32. red
  33. bright green
  34. red
  35. red
  36. 15
  37. 28
  38. red
  39. blue
  40. red

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