← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 248 · 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 of light is strongest in rgb(69, 159, 8)? (a) green (b) blue (c) red
  2. 2.🌈 Which colour is #ff0000? (a) white (b) red (c) bright green (d) black
  3. 3.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
  4. 4.🌈 Which colour of light is strongest in rgb(0, 203, 17)? (a) red (b) blue (c) green
  5. 5.🌈 Which colour is #00ffff? (a) white (b) black (c) red (d) cyan
  6. 6.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  8. 8.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) white (d) blue
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  11. 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  12. 12.🌈 In #980000 the red part is the hex number 98. What is it as a normal number?
  13. 13.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #ffff00 (d) #ff0000
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  15. 15.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) black (c) white (d) red
  16. 16.🌈 Which colour is #000000? (a) cyan (b) black (c) magenta (d) white
  17. 17.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #000000 (d) #00ffff
  18. 18.🌈 In #0000a8 the blue part is the hex number a8. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(17, 8, 234)? (a) blue (b) red (c) green
  20. 20.🌈 Which colour of light is strongest in rgb(43, 161, 58)? (a) red (b) blue (c) green
  21. 21.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) black (d) cyan
  22. 22.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #0000ff (d) #00ff00
  23. 23.🌈 Which colour is #ffff00? (a) yellow (b) red (c) blue (d) white
  24. 24.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) blue (c) magenta (d) bright green
  26. 26.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) magenta (d) black
  27. 27.🌈 Which colour of light is strongest in rgb(156, 40, 27)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour of light is strongest in rgb(78, 3, 162)? (a) red (b) blue (c) green
  29. 29.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) cyan
  30. 30.🌈 Which colour is #ffffff? (a) white (b) yellow (c) cyan (d) blue
  31. 31.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) red (d) yellow
  32. 32.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(66, 191, 132)? (a) blue (b) green (c) red
  34. 34.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) white (d) red
  35. 35.🌈 Which hex code is white? (a) #ffff00 (b) #000000 (c) #ffffff (d) #00ffff
  36. 36.🌈 In #008a00 the green part is the hex number 8a. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(88, 41, 195)? (a) red (b) green (c) blue
  38. 38.🌈 Which hex code is red? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #ff0000
  39. 39.🌈 Which colour of light is strongest in rgb(22, 14, 205)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) cyan (d) blue

Answer key

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

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