← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 92 · 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) red (b) green (c) blue (d) black
  2. 2.🌈 Which colour is #ffff00? (a) white (b) yellow (c) red (d) bright green
  3. 3.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) blue (c) yellow (d) red
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  5. 5.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) magenta (d) white
  6. 6.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  8. 8.🌈 Which hex code is cyan? (a) #ffffff (b) #00ffff (c) #0000ff (d) #ff00ff
  9. 9.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
  10. 10.🌈 Which colour is #000000? (a) cyan (b) black (c) bright green (d) white
  11. 11.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
  12. 12.🌈 Which hex code is blue? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #00ff00
  13. 13.🌈 In #0000a6 the blue part is the hex number a6. What is it as a normal number?
  14. 14.🌈 Which colour is #00ff00? (a) yellow (b) black (c) magenta (d) bright green
  15. 15.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
  17. 17.🌈 Which colour of light is strongest in rgb(64, 104, 206)? (a) green (b) red (c) blue
  18. 18.🌈 Which colour of light is strongest in rgb(168, 79, 20)? (a) blue (b) red (c) green
  19. 19.🌈 Which colour is #ffffff? (a) red (b) cyan (c) white (d) bright green
  20. 20.🌈 Which colour of light is strongest in rgb(88, 136, 193)? (a) green (b) blue (c) red
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
  22. 22.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #0000ff
  23. 23.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) magenta (c) cyan (d) red
  24. 24.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) yellow (d) white
  25. 25.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #0000ff (d) #ffff00
  26. 26.🌈 Which colour of light is strongest in rgb(250, 11, 32)? (a) green (b) red (c) blue
  27. 27.🌈 Which colour of light is strongest in rgb(52, 236, 75)? (a) red (b) blue (c) green
  28. 28.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) white (d) blue
  29. 29.🌈 Which colour of light is strongest in rgb(3, 202, 1)? (a) red (b) green (c) blue
  30. 30.🌈 Which hex code is red? (a) #ffff00 (b) #ff00ff (c) #000000 (d) #ff0000
  31. 31.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #000000 (d) #ff0000
  32. 32.🌈 Which colour is #0000ff? (a) white (b) bright green (c) magenta (d) blue
  33. 33.🌈 Which colour is #00ffff? (a) white (b) bright green (c) cyan (d) blue
  34. 34.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(132, 55, 174)? (a) blue (b) red (c) green
  36. 36.🌈 Which colour of light is strongest in rgb(253, 25, 140)? (a) blue (b) green (c) red
  37. 37.🌈 In #dc0000 the red part is the hex number dc. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(39, 200, 57)? (a) green (b) red (c) blue
  39. 39.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
  40. 40.🌈 In #a20000 the red part is the hex number a2. What is it as a normal number?

Answer key

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

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