← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 141 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  2. 2.🌈 Which hex code is magenta? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #ff00ff
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  4. 4.🌈 Which colour of light is strongest in rgb(206, 6, 104)? (a) red (b) blue (c) green
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  6. 6.🌈 Which hex code is bright green? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #00ff00
  7. 7.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) white (c) yellow (d) red
  8. 8.🌈 In #550000 the red part is the hex number 55. What is it as a normal number?
  9. 9.🌈 Which hex code is red? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #ffffff
  10. 10.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) magenta (c) white (d) blue
  11. 11.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #00ffff (d) #ff0000
  12. 12.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) magenta (d) white
  13. 13.🌈 Which colour of light is strongest in rgb(121, 246, 127)? (a) red (b) blue (c) green
  14. 14.🌈 In #bb0000 the red part is the hex number bb. What is it as a normal number?
  15. 15.🌈 Which hex code is white? (a) #00ff00 (b) #ffff00 (c) #0000ff (d) #ffffff
  16. 16.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
  17. 17.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) black (d) white
  18. 18.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
  19. 19.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) blue (c) red (d) yellow
  20. 20.🌈 Which colour is #ff00ff? (a) white (b) black (c) magenta (d) blue
  21. 21.🌈 Which colour is #000000? (a) black (b) yellow (c) blue (d) red
  22. 22.🌈 Which colour is #ffffff? (a) white (b) black (c) blue (d) bright green
  23. 23.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) white (d) bright green
  24. 24.🌈 Which colour of light is strongest in rgb(22, 90, 216)? (a) red (b) green (c) blue
  25. 25.🌈 Which colour of light is strongest in rgb(5, 190, 123)? (a) blue (b) green (c) red
  26. 26.🌈 Which colour of light is strongest in rgb(131, 214, 47)? (a) green (b) red (c) blue
  27. 27.🌈 In #d50000 the red part is the hex number d5. What is it as a normal number?
  28. 28.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
  29. 29.🌈 Which colour of light is strongest in rgb(181, 76, 118)? (a) red (b) green (c) blue
  30. 30.🌈 Which hex code is blue? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #00ffff
  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 is rgb(0, 255, 255)? (a) cyan (b) red (c) white (d) black
  33. 33.🌈 In #640000 the red part is the hex number 64. What is it as a normal number?
  34. 34.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) red (d) magenta
  35. 35.🌈 Which colour is #ffff00? (a) blue (b) bright green (c) magenta (d) yellow
  36. 36.🌈 In #000f00 the green part is the hex number 0f. What is it as a normal number?
  37. 37.🌈 In #000072 the blue part is the hex number 72. What is it as a normal number?
  38. 38.🌈 In #00b900 the green part is the hex number b9. What is it as a normal number?
  39. 39.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  40. 40.🌈 Which colour of light is strongest in rgb(160, 96, 122)? (a) blue (b) red (c) green

Answer key

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

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