← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 258 · 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, 255, 0)? (a) cyan (b) yellow (c) bright green (d) white
  2. 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  3. 3.🌈 In #e30000 the red part is the hex number e3. What is it as a normal number?
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  5. 5.🌈 Which colour is #ffffff? (a) blue (b) white (c) red (d) cyan
  6. 6.🌈 Which hex code is red? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ff0000
  7. 7.🌈 Which colour is #ffff00? (a) black (b) yellow (c) bright green (d) red
  8. 8.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) black (d) yellow
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  10. 10.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) cyan (d) yellow
  12. 12.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) cyan (d) magenta
  13. 13.🌈 In #190000 the red part is the hex number 19. What is it as a normal number?
  14. 14.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
  16. 16.🌈 Which colour is #ff0000? (a) cyan (b) blue (c) magenta (d) red
  17. 17.🌈 Which hex code is yellow? (a) #ffffff (b) #0000ff (c) #00ffff (d) #ffff00
  18. 18.🌈 Which colour is #00ffff? (a) magenta (b) blue (c) cyan (d) yellow
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
  20. 20.🌈 In #000090 the blue part is the hex number 90. What is it as a normal number?
  21. 21.🌈 Which colour is #000000? (a) black (b) cyan (c) yellow (d) red
  22. 22.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) magenta (c) blue (d) bright green
  24. 24.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
  25. 25.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #000000 (d) #ff0000
  26. 26.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #00ffff
  27. 27.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) bright green (c) black (d) red
  28. 28.🌈 Which colour is #00ff00? (a) red (b) magenta (c) bright green (d) black
  29. 29.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(98, 42, 252)? (a) green (b) red (c) blue
  31. 31.🌈 In #2e0000 the red part is the hex number 2e. What is it as a normal number?
  32. 32.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
  33. 33.🌈 In #0000db the blue part is the hex number db. What is it as a normal number?
  34. 34.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #00ff00
  35. 35.🌈 In #000034 the blue part is the hex number 34. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(112, 230, 86)? (a) red (b) blue (c) green
  37. 37.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(80, 83, 254)? (a) red (b) green (c) blue
  39. 39.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(231, 29, 34)? (a) blue (b) green (c) red

Answer key

  1. yellow
  2. F
  3. 227
  4. 3
  5. white
  6. #ff0000
  7. yellow
  8. blue
  9. blue
  10. 16
  11. white
  12. bright green
  13. 25
  14. 44
  15. red
  16. red
  17. #ffff00
  18. cyan
  19. 255
  20. 144
  21. black
  22. 101
  23. magenta
  24. 42
  25. #ffffff
  26. #00ffff
  27. red
  28. bright green
  29. 50
  30. blue
  31. 46
  32. 146
  33. 219
  34. #00ff00
  35. 52
  36. green
  37. 133
  38. blue
  39. 192
  40. red

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