← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 206 · 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 #a90000 the red part is the hex number a9. What is it as a normal number?
  2. 2.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ffffff
  3. 3.🌈 In #140000 the red part is the hex number 14. What is it as a normal number?
  4. 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  6. 6.🌈 Which colour of light is strongest in rgb(171, 21, 111)? (a) green (b) blue (c) red
  7. 7.🌈 In #0000a8 the blue part is the hex number a8. What is it as a normal number?
  8. 8.🌈 In #00006d the blue part is the hex number 6d. What is it as a normal number?
  9. 9.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #00ffff (d) #00ff00
  10. 10.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
  11. 11.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) yellow (c) black (d) bright green
  12. 12.🌈 Which colour is #000000? (a) blue (b) cyan (c) black (d) yellow
  13. 13.🌈 Which colour of light is strongest in rgb(236, 123, 84)? (a) green (b) blue (c) red
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) bright green (c) red (d) blue
  15. 15.🌈 Which colour is #0000ff? (a) cyan (b) black (c) white (d) blue
  16. 16.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
  17. 17.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  18. 18.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
  19. 19.🌈 In #00006a the blue part is the hex number 6a. What is it as a normal number?
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  21. 21.🌈 Which colour of light is strongest in rgb(6, 22, 238)? (a) red (b) blue (c) green
  22. 22.🌈 Which colour is #ff0000? (a) bright green (b) magenta (c) red (d) yellow
  23. 23.🌈 Which colour of light is strongest in rgb(245, 120, 97)? (a) red (b) blue (c) green
  24. 24.🌈 In #3c0000 the red part is the hex number 3c. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) yellow (d) red
  26. 26.🌈 Which colour is #ff00ff? (a) black (b) yellow (c) magenta (d) white
  27. 27.🌈 Which colour of light is strongest in rgb(138, 14, 154)? (a) blue (b) red (c) green
  28. 28.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) cyan (c) yellow (d) black
  29. 29.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) yellow (c) magenta (d) black
  30. 30.🌈 In #000700 the green part is the hex number 07. What is it as a normal number?
  31. 31.🌈 Which colour is #00ffff? (a) magenta (b) white (c) cyan (d) yellow
  32. 32.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) G (d) J
  33. 33.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) cyan (c) black (d) red
  34. 34.🌈 In #000007 the blue part is the hex number 07. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(120, 1, 203)? (a) blue (b) green (c) red
  36. 36.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) bright green (c) cyan (d) white
  37. 37.🌈 In #580000 the red part is the hex number 58. What is it as a normal number?
  38. 38.🌈 Which colour is #ffff00? (a) red (b) bright green (c) yellow (d) white
  39. 39.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffffff (c) #00ffff (d) #ff0000
  40. 40.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?

Answer key

  1. 169
  2. #ff00ff
  3. 20
  4. 3
  5. blue
  6. red
  7. 168
  8. 109
  9. #ff0000
  10. 35
  11. bright green
  12. black
  13. red
  14. blue
  15. blue
  16. 11
  17. 255
  18. 26
  19. 106
  20. red
  21. blue
  22. red
  23. red
  24. 60
  25. cyan
  26. magenta
  27. blue
  28. yellow
  29. magenta
  30. 7
  31. cyan
  32. F
  33. red
  34. 7
  35. blue
  36. white
  37. 88
  38. yellow
  39. #00ffff
  40. 39

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