← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 116 · 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, 0)? (a) white (b) bright green (c) red (d) black
  2. 2.🌈 Which colour is #00ffff? (a) blue (b) magenta (c) cyan (d) bright green
  3. 3.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) magenta (c) red (d) blue
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  5. 5.🌈 In #000046 the blue part is the hex number 46. What is it as a normal number?
  6. 6.🌈 Which colour of light is strongest in rgb(237, 87, 8)? (a) green (b) red (c) blue
  7. 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  8. 8.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
  9. 9.🌈 In #00008d the blue part is the hex number 8d. What is it as a normal number?
  10. 10.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) white (c) blue (d) bright green
  11. 11.🌈 Which hex code is red? (a) #ff0000 (b) #000000 (c) #ffffff (d) #ffff00
  12. 12.🌈 Which colour of light is strongest in rgb(92, 169, 80)? (a) green (b) blue (c) red
  13. 13.🌈 Which colour of light is strongest in rgb(76, 67, 248)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour is #ff0000? (a) cyan (b) yellow (c) red (d) blue
  15. 15.🌈 Which colour is #000000? (a) red (b) blue (c) black (d) cyan
  16. 16.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #ff0000
  17. 17.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) black (c) yellow (d) bright green
  18. 18.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  19. 19.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ffff (c) #00ff00 (d) #ff00ff
  20. 20.🌈 Which colour of light is strongest in rgb(35, 128, 170)? (a) red (b) blue (c) green
  21. 21.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) red (d) black
  22. 22.🌈 Which colour of light is strongest in rgb(18, 203, 8)? (a) red (b) green (c) blue
  23. 23.🌈 Which colour of light is strongest in rgb(2, 211, 99)? (a) green (b) red (c) blue
  24. 24.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
  25. 25.🌈 In #dc0000 the red part is the hex number dc. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) black (d) bright green
  27. 27.🌈 In #00db00 the green part is the hex number db. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) blue (c) yellow (d) white
  29. 29.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #00ff00
  30. 30.🌈 In #930000 the red part is the hex number 93. What is it as a normal number?
  31. 31.🌈 In #760000 the red part is the hex number 76. What is it as a normal number?
  32. 32.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
  33. 33.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #00ff00
  34. 34.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) magenta (d) blue
  35. 35.🌈 In #00003a the blue part is the hex number 3a. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(94, 170, 9)? (a) red (b) green (c) blue
  37. 37.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  38. 38.🌈 In #000098 the blue part is the hex number 98. What is it as a normal number?
  39. 39.🌈 Which colour is #00ff00? (a) magenta (b) white (c) bright green (d) black
  40. 40.🌈 Which colour is #ffffff? (a) blue (b) bright green (c) magenta (d) white

Answer key

  1. red
  2. cyan
  3. blue
  4. F
  5. 70
  6. red
  7. 3
  8. 250
  9. 141
  10. bright green
  11. #ff0000
  12. green
  13. blue
  14. red
  15. black
  16. #ffffff
  17. cyan
  18. 255
  19. #00ff00
  20. blue
  21. blue
  22. green
  23. green
  24. 180
  25. 220
  26. magenta
  27. 219
  28. yellow
  29. #ffff00
  30. 147
  31. 118
  32. red
  33. #00ffff
  34. magenta
  35. 58
  36. green
  37. blue
  38. 152
  39. bright green
  40. white

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