← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 165 · 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.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  2. 2.🌈 Which colour is #0000ff? (a) black (b) magenta (c) blue (d) white
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  4. 4.🌈 In #970000 the red part is the hex number 97. What is it as a normal number?
  5. 5.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) black (d) white
  6. 6.🌈 Which colour is #00ff00? (a) blue (b) cyan (c) magenta (d) bright green
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  8. 8.🌈 Which colour is #000000? (a) magenta (b) black (c) white (d) bright green
  9. 9.🌈 Which colour of light is strongest in rgb(215, 74, 10)? (a) blue (b) red (c) green
  10. 10.🌈 Which colour of light is strongest in rgb(244, 41, 64)? (a) green (b) red (c) blue
  11. 11.🌈 In #0000f3 the blue part is the hex number f3. What is it as a normal number?
  12. 12.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #ffffff
  13. 13.🌈 In #dc0000 the red part is the hex number dc. What is it as a normal number?
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) bright green (c) white (d) blue
  15. 15.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
  16. 16.🌈 In #000400 the green part is the hex number 04. What is it as a normal number?
  17. 17.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
  18. 18.🌈 Which colour is #ffffff? (a) blue (b) red (c) bright green (d) white
  19. 19.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #00ff00
  20. 20.🌈 In #008900 the green part is the hex number 89. What is it as a normal number?
  21. 21.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
  22. 22.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) blue (d) bright green
  23. 23.🌈 Which colour is #ff0000? (a) bright green (b) blue (c) magenta (d) red
  24. 24.🌈 Which colour is #00ffff? (a) yellow (b) red (c) white (d) cyan
  25. 25.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #ffff00 (d) #00ffff
  26. 26.🌈 Which colour of light is strongest in rgb(140, 250, 93)? (a) blue (b) green (c) red
  27. 27.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) yellow (c) white (d) black
  29. 29.🌈 Which hex code is black? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #000000
  30. 30.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  31. 31.🌈 Which hex code is white? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #ffffff
  32. 32.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) blue (d) yellow
  33. 33.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) blue (c) cyan (d) white
  34. 34.🌈 Which colour is #ffff00? (a) yellow (b) red (c) magenta (d) blue
  35. 35.🌈 In #2b0000 the red part is the hex number 2b. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(235, 27, 8)? (a) green (b) blue (c) red
  37. 37.🌈 In #0000b4 the blue part is the hex number b4. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(185, 59, 105)? (a) blue (b) green (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(64, 192, 14)? (a) blue (b) green (c) red
  40. 40.🌈 In #0000ba the blue part is the hex number ba. What is it as a normal number?

Answer key

  1. blue
  2. blue
  3. F
  4. 151
  5. bright green
  6. bright green
  7. red
  8. black
  9. red
  10. red
  11. 243
  12. #00ffff
  13. 220
  14. blue
  15. 3
  16. 4
  17. 18
  18. white
  19. #ff00ff
  20. 137
  21. 57
  22. yellow
  23. red
  24. cyan
  25. #00ff00
  26. green
  27. 130
  28. black
  29. #000000
  30. 255
  31. #ffffff
  32. magenta
  33. cyan
  34. yellow
  35. 43
  36. red
  37. 180
  38. red
  39. green
  40. 186

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