← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 315 · 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) black (c) blue (d) green
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
  3. 3.🌈 Which colour is #ff0000? (a) bright green (b) red (c) yellow (d) magenta
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  5. 5.🌈 Which colour of light is strongest in rgb(158, 12, 42)? (a) blue (b) red (c) green
  6. 6.🌈 Which hex code is bright green? (a) #ff00ff (b) #000000 (c) #0000ff (d) #00ff00
  7. 7.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
  8. 8.🌈 Which colour of light is strongest in rgb(153, 45, 115)? (a) green (b) blue (c) red
  9. 9.🌈 In #00005c the blue part is the hex number 5c. What is it as a normal number?
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  11. 11.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) cyan (d) red
  12. 12.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
  13. 13.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) bright green (c) black (d) yellow
  14. 14.🌈 Which colour of light is strongest in rgb(101, 226, 69)? (a) green (b) blue (c) red
  15. 15.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) yellow (d) red
  16. 16.🌈 Which colour is #00ffff? (a) cyan (b) red (c) magenta (d) bright green
  17. 17.🌈 Which hex code is white? (a) #ffffff (b) #00ffff (c) #ffff00 (d) #ff0000
  18. 18.🌈 Which colour of light is strongest in rgb(201, 91, 96)? (a) blue (b) red (c) green
  19. 19.🌈 Which hex code is blue? (a) #0000ff (b) #ffff00 (c) #00ffff (d) #000000
  20. 20.🌈 In #cc0000 the red part is the hex number cc. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(80, 61, 172)? (a) red (b) green (c) blue
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  23. 23.🌈 In #001a00 the green part is the hex number 1a. What is it as a normal number?
  24. 24.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) blue (d) magenta
  25. 25.🌈 Which colour is #00ff00? (a) magenta (b) bright green (c) black (d) cyan
  26. 26.🌈 Which hex code is cyan? (a) #0000ff (b) #ffff00 (c) #ff0000 (d) #00ffff
  27. 27.🌈 Which hex code is red? (a) #000000 (b) #00ff00 (c) #ffffff (d) #ff0000
  28. 28.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) black (d) yellow
  29. 29.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) magenta (c) blue (d) black
  30. 30.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(134, 0, 195)? (a) green (b) red (c) blue
  32. 32.🌈 Which colour of light is strongest in rgb(50, 231, 137)? (a) red (b) green (c) blue
  33. 33.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
  34. 34.🌈 Which colour is #ffffff? (a) white (b) bright green (c) magenta (d) red
  35. 35.🌈 Which colour of light is strongest in rgb(95, 207, 102)? (a) blue (b) red (c) green
  36. 36.🌈 Which colour of light is strongest in rgb(72, 110, 211)? (a) blue (b) red (c) green
  37. 37.🌈 In #0000e8 the blue part is the hex number e8. What is it as a normal number?
  38. 38.🌈 Which colour is #000000? (a) cyan (b) white (c) blue (d) black
  39. 39.🌈 Which hex code is black? (a) #00ffff (b) #000000 (c) #ffffff (d) #ff0000
  40. 40.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?

Answer key

  1. red
  2. 3
  3. red
  4. F
  5. red
  6. #00ff00
  7. 242
  8. red
  9. 92
  10. blue
  11. bright green
  12. 155
  13. yellow
  14. green
  15. magenta
  16. cyan
  17. #ffffff
  18. red
  19. #0000ff
  20. 204
  21. blue
  22. 255
  23. 26
  24. cyan
  25. bright green
  26. #00ffff
  27. #ff0000
  28. red
  29. black
  30. 130
  31. blue
  32. green
  33. 45
  34. white
  35. green
  36. blue
  37. 232
  38. black
  39. #000000
  40. 63

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