← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 106 · 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, 0, 255)? (a) magenta (b) yellow (c) blue (d) white
  2. 2.🌈 Which colour of light is strongest in rgb(64, 167, 27)? (a) blue (b) red (c) green
  3. 3.🌈 Which hex code is white? (a) #ffffff (b) #ff00ff (c) #000000 (d) #0000ff
  4. 4.🌈 Which colour is #ff0000? (a) white (b) magenta (c) blue (d) red
  5. 5.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ffff (d) #ff00ff
  6. 6.🌈 Which colour of light is strongest in rgb(244, 135, 27)? (a) blue (b) red (c) green
  7. 7.🌈 In #00da00 the green part is the hex number da. What is it as a normal number?
  8. 8.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) magenta (d) red
  9. 9.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
  10. 10.🌈 Which colour of light is strongest in rgb(36, 233, 68)? (a) green (b) red (c) blue
  11. 11.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #ff00ff (d) #00ff00
  12. 12.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) magenta (c) red (d) cyan
  13. 13.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #ff00ff
  14. 14.🌈 Which colour of light is strongest in rgb(65, 3, 185)? (a) blue (b) red (c) green
  15. 15.🌈 Which colour of light is strongest in rgb(220, 61, 74)? (a) green (b) blue (c) red
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
  17. 17.🌈 Which hex code is blue? (a) #0000ff (b) #ffff00 (c) #000000 (d) #00ff00
  18. 18.🌈 In #00ac00 the green part is the hex number ac. What is it as a normal number?
  19. 19.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
  20. 20.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) bright green (c) black (d) red
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
  22. 22.🌈 Which colour is #0000ff? (a) yellow (b) red (c) bright green (d) blue
  23. 23.🌈 Which colour is #ffffff? (a) magenta (b) white (c) black (d) red
  24. 24.🌈 Which colour of light is strongest in rgb(160, 5, 125)? (a) blue (b) red (c) green
  25. 25.🌈 Which hex code is black? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ffffff
  26. 26.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) cyan (d) bright green
  28. 28.🌈 Which colour of light is strongest in rgb(212, 53, 78)? (a) green (b) blue (c) red
  29. 29.🌈 In #580000 the red part is the hex number 58. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) black (c) bright green (d) cyan
  31. 31.🌈 In #d20000 the red part is the hex number d2. What is it as a normal number?
  32. 32.🌈 Which colour is #ff00ff? (a) blue (b) white (c) red (d) magenta
  33. 33.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
  34. 34.🌈 Which colour is #00ff00? (a) blue (b) magenta (c) bright green (d) yellow
  35. 35.🌈 Which colour of light is strongest in rgb(115, 151, 8)? (a) blue (b) red (c) green
  36. 36.🌈 In #0000a3 the blue part is the hex number a3. What is it as a normal number?
  37. 37.🌈 Which hex code is bright green? (a) #000000 (b) #ff0000 (c) #00ff00 (d) #0000ff
  38. 38.🌈 Which colour of light is strongest in rgb(163, 126, 131)? (a) green (b) blue (c) red
  39. 39.🌈 In #0000d4 the blue part is the hex number d4. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(188, 109, 87)? (a) blue (b) green (c) red

Answer key

  1. blue
  2. green
  3. #ffffff
  4. red
  5. #00ffff
  6. red
  7. 218
  8. magenta
  9. 56
  10. green
  11. #ffff00
  12. yellow
  13. #ff00ff
  14. blue
  15. red
  16. blue
  17. #0000ff
  18. 172
  19. red
  20. red
  21. 3
  22. blue
  23. white
  24. red
  25. #000000
  26. 255
  27. bright green
  28. red
  29. 88
  30. cyan
  31. 210
  32. magenta
  33. 106
  34. bright green
  35. green
  36. 163
  37. #00ff00
  38. red
  39. 212
  40. red

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