← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 200 · 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 #ff0000? (a) blue (b) black (c) white (d) red
  2. 2.🌈 In #970000 the red part is the hex number 97. What is it as a normal number?
  3. 3.🌈 Which colour is #ffffff? (a) cyan (b) white (c) bright green (d) red
  4. 4.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #0000ff (d) #ffff00
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  6. 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
  7. 7.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  8. 8.🌈 Which hex code is yellow? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #ffff00
  9. 9.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
  10. 10.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) blue (d) cyan
  11. 11.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) white (d) cyan
  12. 12.🌈 In #002f00 the green part is the hex number 2f. What is it as a normal number?
  13. 13.🌈 In #007800 the green part is the hex number 78. What is it as a normal number?
  14. 14.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #000000
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  16. 16.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
  17. 17.🌈 Which colour is #00ffff? (a) magenta (b) blue (c) yellow (d) cyan
  18. 18.🌈 Which colour of light is strongest in rgb(23, 239, 49)? (a) blue (b) red (c) green
  19. 19.🌈 Which colour of light is strongest in rgb(151, 51, 45)? (a) green (b) blue (c) red
  20. 20.🌈 Which hex code is bright green? (a) #ff00ff (b) #00ffff (c) #ff0000 (d) #00ff00
  21. 21.🌈 Which colour of light is strongest in rgb(67, 241, 125)? (a) red (b) blue (c) green
  22. 22.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) yellow (d) black
  23. 23.🌈 In #000022 the blue part is the hex number 22. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(87, 11, 228)? (a) green (b) red (c) blue
  25. 25.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #ffff00
  26. 26.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) bright green (d) yellow
  27. 27.🌈 Which colour of light is strongest in rgb(3, 74, 161)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour of light is strongest in rgb(188, 116, 21)? (a) red (b) green (c) blue
  29. 29.🌈 Which colour is #000000? (a) yellow (b) black (c) cyan (d) white
  30. 30.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) black (c) cyan (d) bright green
  31. 31.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) cyan (c) magenta (d) black
  32. 32.🌈 Which colour is #ff00ff? (a) red (b) cyan (c) magenta (d) black
  33. 33.🌈 Which colour of light is strongest in rgb(33, 127, 229)? (a) green (b) red (c) blue
  34. 34.🌈 Which colour is #00ff00? (a) blue (b) bright green (c) white (d) magenta
  35. 35.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffff00 (c) #000000 (d) #00ffff
  36. 36.🌈 Which colour is #0000ff? (a) magenta (b) yellow (c) blue (d) bright green
  37. 37.🌈 In #4c0000 the red part is the hex number 4c. What is it as a normal number?
  38. 38.🌈 In #00ce00 the green part is the hex number ce. What is it as a normal number?
  39. 39.🌈 In #9e0000 the red part is the hex number 9e. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(122, 23, 162)? (a) red (b) green (c) blue

Answer key

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

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