← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 243 · 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 last two digits give? (a) blue (b) red (c) green (d) white
  2. 2.🌈 Which colour is #ffff00? (a) bright green (b) white (c) yellow (d) blue
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
  4. 4.🌈 Which colour of light is strongest in rgb(178, 0, 0)? (a) blue (b) green (c) red
  5. 5.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) blue (c) cyan (d) magenta
  6. 6.🌈 Which colour of light is strongest in rgb(200, 97, 125)? (a) red (b) green (c) blue
  7. 7.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) magenta (d) black
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  9. 9.🌈 Which colour is #0000ff? (a) black (b) blue (c) red (d) cyan
  10. 10.🌈 In #005b00 the green part is the hex number 5b. What is it as a normal number?
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  12. 12.🌈 Which colour is #ff00ff? (a) white (b) red (c) magenta (d) yellow
  13. 13.🌈 Which hex code is blue? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #0000ff
  14. 14.🌈 Which colour is #ff0000? (a) black (b) white (c) red (d) bright green
  15. 15.🌈 In #e00000 the red part is the hex number e0. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) white (c) black (d) red
  17. 17.🌈 Which colour of light is strongest in rgb(110, 248, 48)? (a) red (b) blue (c) green
  18. 18.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
  19. 19.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #000000 (d) #00ff00
  20. 20.🌈 In #004a00 the green part is the hex number 4a. What is it as a normal number?
  21. 21.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
  22. 22.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) blue (d) red
  23. 23.🌈 Which colour of light is strongest in rgb(56, 179, 64)? (a) green (b) blue (c) red
  24. 24.🌈 Which colour is #ffffff? (a) blue (b) red (c) magenta (d) white
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) black (c) bright green (d) blue
  26. 26.🌈 Which colour of light is strongest in rgb(177, 116, 134)? (a) red (b) blue (c) green
  27. 27.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
  28. 28.🌈 Which colour is #00ffff? (a) red (b) magenta (c) blue (d) cyan
  29. 29.🌈 Which colour is #000000? (a) cyan (b) black (c) magenta (d) blue
  30. 30.🌈 Which colour of light is strongest in rgb(237, 116, 89)? (a) red (b) blue (c) green
  31. 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
  32. 32.🌈 Which colour of light is strongest in rgb(189, 23, 15)? (a) green (b) red (c) blue
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) black (d) red
  34. 34.🌈 Which hex code is magenta? (a) #00ffff (b) #ff00ff (c) #0000ff (d) #00ff00
  35. 35.🌈 Which colour of light is strongest in rgb(127, 212, 0)? (a) red (b) green (c) blue
  36. 36.🌈 Which colour of light is strongest in rgb(31, 12, 234)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour of light is strongest in rgb(47, 102, 219)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) magenta (d) red
  39. 39.🌈 In #007c00 the green part is the hex number 7c. What is it as a normal number?
  40. 40.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?

Answer key

  1. blue
  2. yellow
  3. 255
  4. red
  5. magenta
  6. red
  7. yellow
  8. F
  9. blue
  10. 91
  11. red
  12. magenta
  13. #0000ff
  14. red
  15. 224
  16. bright green
  17. green
  18. 161
  19. #ff0000
  20. 74
  21. 51
  22. white
  23. green
  24. white
  25. blue
  26. red
  27. 210
  28. cyan
  29. black
  30. red
  31. 3
  32. red
  33. cyan
  34. #ff00ff
  35. green
  36. blue
  37. blue
  38. red
  39. 124
  40. 42

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