← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 175 · 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, 255)? (a) white (b) yellow (c) magenta (d) blue
  2. 2.🌈 Which hex code is black? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #000000
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  4. 4.🌈 In #000077 the blue part is the hex number 77. What is it as a normal number?
  5. 5.🌈 In #003000 the green part is the hex number 30. What is it as a normal number?
  6. 6.🌈 Which colour of light is strongest in rgb(119, 222, 1)? (a) blue (b) green (c) red
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) magenta (d) bright green
  9. 9.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #ff00ff (d) #0000ff
  10. 10.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  11. 11.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  12. 12.🌈 Which colour of light is strongest in rgb(7, 39, 244)? (a) red (b) green (c) blue
  13. 13.🌈 Which hex code is white? (a) #000000 (b) #00ff00 (c) #ffffff (d) #ffff00
  14. 14.🌈 In #0e0000 the red part is the hex number 0e. What is it as a normal number?
  15. 15.🌈 Which colour is #0000ff? (a) blue (b) magenta (c) cyan (d) yellow
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  17. 17.🌈 Which colour of light is strongest in rgb(25, 56, 169)? (a) green (b) red (c) blue
  18. 18.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #ff00ff
  19. 19.🌈 Which colour of light is strongest in rgb(115, 168, 6)? (a) red (b) green (c) blue
  20. 20.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  21. 21.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  22. 22.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) red (d) cyan
  23. 23.🌈 Which hex code is bright green? (a) #000000 (b) #ffff00 (c) #ffffff (d) #00ff00
  24. 24.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
  25. 25.🌈 In #0000a1 the blue part is the hex number a1. What is it as a normal number?
  26. 26.🌈 In #003300 the green part is the hex number 33. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) red (c) bright green (d) yellow
  28. 28.🌈 In #910000 the red part is the hex number 91. What is it as a normal number?
  29. 29.🌈 In #0000eb the blue part is the hex number eb. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(83, 228, 68)? (a) blue (b) green (c) red
  31. 31.🌈 In #002c00 the green part is the hex number 2c. What is it as a normal number?
  32. 32.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) bright green (d) red
  33. 33.🌈 In #4f0000 the red part is the hex number 4f. What is it as a normal number?
  34. 34.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
  35. 35.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(86, 181, 98)? (a) red (b) blue (c) green
  37. 37.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
  38. 38.🌈 Which colour is #000000? (a) bright green (b) blue (c) yellow (d) black
  39. 39.🌈 Which colour of light is strongest in rgb(48, 191, 28)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour is #ffffff? (a) red (b) cyan (c) bright green (d) white

Answer key

  1. white
  2. #000000
  3. blue
  4. 119
  5. 48
  6. green
  7. red
  8. cyan
  9. #ff0000
  10. 241
  11. 255
  12. blue
  13. #ffffff
  14. 14
  15. blue
  16. 3
  17. blue
  18. #00ffff
  19. green
  20. F
  21. 242
  22. blue
  23. #00ff00
  24. 78
  25. 161
  26. 51
  27. yellow
  28. 145
  29. 235
  30. green
  31. 44
  32. cyan
  33. 79
  34. 208
  35. 162
  36. green
  37. 101
  38. black
  39. green
  40. white

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