← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 39 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  2. 2.🌈 Which colour is #00ff00? (a) magenta (b) black (c) red (d) bright green
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) white (d) bright green
  4. 4.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) black (c) blue (d) yellow
  5. 5.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) black (d) magenta
  6. 6.🌈 Which colour of light is strongest in rgb(174, 62, 137)? (a) red (b) green (c) blue
  7. 7.🌈 Which colour of light is strongest in rgb(12, 176, 7)? (a) green (b) blue (c) red
  8. 8.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #ffff00 (d) #ff0000
  9. 9.🌈 Which colour of light is strongest in rgb(223, 48, 95)? (a) green (b) blue (c) red
  10. 10.🌈 Which colour of light is strongest in rgb(252, 24, 28)? (a) red (b) green (c) blue
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  12. 12.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) yellow (c) magenta (d) bright green
  13. 13.🌈 In #00f300 the green part is the hex number f3. What is it as a normal number?
  14. 14.🌈 In #e40000 the red part is the hex number e4. What is it as a normal number?
  15. 15.🌈 Which colour is #000000? (a) blue (b) red (c) white (d) black
  16. 16.🌈 Which colour of light is strongest in rgb(231, 36, 77)? (a) red (b) blue (c) green
  17. 17.🌈 Which colour of light is strongest in rgb(211, 19, 107)? (a) green (b) red (c) blue
  18. 18.🌈 Which colour of light is strongest in rgb(239, 97, 75)? (a) blue (b) green (c) red
  19. 19.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #00ffff (d) #ff00ff
  20. 20.🌈 Which colour is #ff0000? (a) blue (b) white (c) black (d) red
  21. 21.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) magenta (c) red (d) blue
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  23. 23.🌈 In #00ce00 the green part is the hex number ce. What is it as a normal number?
  24. 24.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
  25. 25.🌈 Which colour of light is strongest in rgb(58, 124, 220)? (a) blue (b) green (c) red
  26. 26.🌈 Which colour of light is strongest in rgb(219, 30, 15)? (a) red (b) blue (c) green
  27. 27.🌈 Which colour of light is strongest in rgb(236, 38, 19)? (a) red (b) blue (c) green
  28. 28.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) cyan
  29. 29.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
  30. 30.🌈 Which colour is #0000ff? (a) black (b) magenta (c) blue (d) cyan
  31. 31.🌈 Which colour of light is strongest in rgb(74, 109, 153)? (a) red (b) blue (c) green
  32. 32.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) red (d) bright green
  33. 33.🌈 In #0000ad the blue part is the hex number ad. What is it as a normal number?
  34. 34.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) magenta (c) blue (d) white
  35. 35.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
  36. 36.🌈 Which colour of light is strongest in rgb(165, 21, 31)? (a) red (b) green (c) blue
  37. 37.🌈 Which colour of light is strongest in rgb(16, 152, 110)? (a) green (b) red (c) blue
  38. 38.🌈 Which hex code is white? (a) #00ff00 (b) #ff00ff (c) #000000 (d) #ffffff
  39. 39.🌈 Which hex code is cyan? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ffff
  40. 40.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?

Answer key

  1. 3
  2. bright green
  3. red
  4. yellow
  5. bright green
  6. red
  7. green
  8. #000000
  9. red
  10. red
  11. blue
  12. magenta
  13. 243
  14. 228
  15. black
  16. red
  17. red
  18. red
  19. #ff00ff
  20. red
  21. blue
  22. 255
  23. 206
  24. 210
  25. blue
  26. red
  27. red
  28. yellow
  29. 42
  30. blue
  31. blue
  32. magenta
  33. 173
  34. white
  35. F
  36. red
  37. green
  38. #ffffff
  39. #00ffff
  40. 34

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