← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 95 · 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(0, 255, 255)? (a) magenta (b) cyan (c) black (d) red
  2. 2.🌈 Which colour is #0000ff? (a) bright green (b) white (c) blue (d) red
  3. 3.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) bright green (d) red
  4. 4.🌈 In #00a200 the green part is the hex number a2. What is it as a normal number?
  5. 5.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #ff0000 (d) #ffffff
  6. 6.🌈 In #001600 the green part is the hex number 16. What is it as a normal number?
  7. 7.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  8. 8.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) red (d) blue
  9. 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  11. 11.🌈 Which colour of light is strongest in rgb(114, 208, 120)? (a) blue (b) red (c) green
  12. 12.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #ffffff (d) #ff0000
  13. 13.🌈 Which colour of light is strongest in rgb(235, 72, 43)? (a) blue (b) green (c) red
  14. 14.🌈 Which hex code is blue? (a) #ffff00 (b) #00ffff (c) #0000ff (d) #ffffff
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
  16. 16.🌈 Which colour of light is strongest in rgb(222, 41, 101)? (a) green (b) red (c) blue
  17. 17.🌈 Which colour of light is strongest in rgb(241, 21, 80)? (a) red (b) blue (c) green
  18. 18.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) yellow (d) magenta
  19. 19.🌈 Which colour of light is strongest in rgb(108, 248, 68)? (a) green (b) red (c) blue
  20. 20.🌈 Which colour of light is strongest in rgb(254, 35, 41)? (a) green (b) blue (c) red
  21. 21.🌈 Which colour of light is strongest in rgb(173, 1, 5)? (a) blue (b) red (c) green
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  23. 23.🌈 Which colour of light is strongest in rgb(32, 222, 130)? (a) green (b) blue (c) red
  24. 24.🌈 Which colour of light is strongest in rgb(62, 229, 138)? (a) green (b) blue (c) red
  25. 25.🌈 Which hex code is bright green? (a) #ff00ff (b) #00ff00 (c) #ffffff (d) #000000
  26. 26.🌈 Which colour is #ff00ff? (a) cyan (b) yellow (c) magenta (d) bright green
  27. 27.🌈 Which colour of light is strongest in rgb(150, 4, 136)? (a) blue (b) red (c) green
  28. 28.🌈 Which colour of light is strongest in rgb(93, 249, 35)? (a) blue (b) green (c) red
  29. 29.🌈 Which colour of light is strongest in rgb(6, 228, 69)? (a) red (b) green (c) blue
  30. 30.🌈 Which hex code is magenta? (a) #00ffff (b) #0000ff (c) #ff00ff (d) #00ff00
  31. 31.🌈 Which colour of light is strongest in rgb(153, 26, 66)? (a) red (b) blue (c) green
  32. 32.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) blue (d) yellow
  33. 33.🌈 In #880000 the red part is the hex number 88. What is it as a normal number?
  34. 34.🌈 In #000700 the green part is the hex number 07. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(168, 21, 126)? (a) green (b) blue (c) red
  36. 36.🌈 Which colour of light is strongest in rgb(206, 58, 91)? (a) green (b) blue (c) red
  37. 37.🌈 In #0000b3 the blue part is the hex number b3. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(83, 255, 136)? (a) blue (b) red (c) green
  39. 39.🌈 Which colour of light is strongest in rgb(13, 138, 177)? (a) red (b) blue (c) green
  40. 40.🌈 In #00007b the blue part is the hex number 7b. What is it as a normal number?

Answer key

  1. cyan
  2. blue
  3. bright green
  4. 162
  5. #000000
  6. 22
  7. blue
  8. cyan
  9. F
  10. 3
  11. green
  12. #00ffff
  13. red
  14. #0000ff
  15. red
  16. red
  17. red
  18. blue
  19. green
  20. red
  21. red
  22. 255
  23. green
  24. green
  25. #00ff00
  26. magenta
  27. red
  28. green
  29. green
  30. #ff00ff
  31. red
  32. black
  33. 136
  34. 7
  35. red
  36. red
  37. 179
  38. green
  39. blue
  40. 123

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