← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 259 · 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) 6 (b) 2 (c) 4 (d) 3
  2. 2.🌈 Which hex code is black? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ff00
  3. 3.🌈 Which hex code is red? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #0000ff
  4. 4.🌈 Which hex code is white? (a) #00ff00 (b) #00ffff (c) #ffffff (d) #ff00ff
  5. 5.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) red (d) magenta
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
  7. 7.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffff00 (c) #ff0000 (d) #0000ff
  8. 8.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
  9. 9.🌈 Which colour is #0000ff? (a) red (b) blue (c) cyan (d) yellow
  10. 10.🌈 Which colour of light is strongest in rgb(11, 195, 54)? (a) blue (b) red (c) green
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  12. 12.🌈 Which colour of light is strongest in rgb(86, 123, 164)? (a) green (b) blue (c) red
  13. 13.🌈 In #0000c6 the blue part is the hex number c6. What is it as a normal number?
  14. 14.🌈 Which colour is #ff00ff? (a) cyan (b) red (c) yellow (d) magenta
  15. 15.🌈 In #003e00 the green part is the hex number 3e. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) red (c) yellow (d) cyan
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) white (d) blue
  18. 18.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) blue (d) magenta
  19. 19.🌈 Which colour is #ffff00? (a) bright green (b) white (c) red (d) yellow
  20. 20.🌈 In #9f0000 the red part is the hex number 9f. What is it as a normal number?
  21. 21.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
  22. 22.🌈 In #001b00 the green part is the hex number 1b. What is it as a normal number?
  23. 23.🌈 Which colour of light is strongest in rgb(78, 49, 203)? (a) green (b) red (c) blue
  24. 24.🌈 Which colour of light is strongest in rgb(115, 251, 45)? (a) blue (b) green (c) red
  25. 25.🌈 Which hex code is yellow? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ffff00
  26. 26.🌈 Which colour is #ff0000? (a) black (b) magenta (c) red (d) white
  27. 27.🌈 Which colour of light is strongest in rgb(24, 5, 185)? (a) blue (b) green (c) red
  28. 28.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
  29. 29.🌈 In #00f200 the green part is the hex number f2. What is it as a normal number?
  30. 30.🌈 In #0000d7 the blue part is the hex number d7. What is it as a normal number?
  31. 31.🌈 In #00009f the blue part is the hex number 9f. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) bright green (d) blue
  33. 33.🌈 Which colour of light is strongest in rgb(10, 60, 166)? (a) blue (b) green (c) red
  34. 34.🌈 Which colour is #000000? (a) blue (b) black (c) magenta (d) white
  35. 35.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) magenta (d) white
  36. 36.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) red (d) yellow
  37. 37.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(62, 66, 204)? (a) green (b) red (c) blue
  39. 39.🌈 Which colour is #00ff00? (a) bright green (b) cyan (c) red (d) black
  40. 40.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #0000ff (d) #000000

Answer key

  1. 3
  2. #000000
  3. #ff0000
  4. #ffffff
  5. cyan
  6. F
  7. #ff00ff
  8. 255
  9. blue
  10. green
  11. red
  12. blue
  13. 198
  14. magenta
  15. 62
  16. blue
  17. red
  18. white
  19. yellow
  20. 159
  21. 18
  22. 27
  23. blue
  24. green
  25. #ffff00
  26. red
  27. blue
  28. 126
  29. 242
  30. 215
  31. 159
  32. black
  33. blue
  34. black
  35. yellow
  36. magenta
  37. 50
  38. blue
  39. bright green
  40. #00ff00

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