← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 78 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
  2. 2.🌈 Which colour is #ff0000? (a) white (b) red (c) bright green (d) black
  3. 3.🌈 In #00003a the blue part is the hex number 3a. What is it as a normal number?
  4. 4.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  5. 5.🌈 Which colour of light is strongest in rgb(78, 218, 25)? (a) green (b) red (c) blue
  6. 6.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) yellow (d) magenta
  7. 7.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) red (d) black
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
  9. 9.🌈 Which colour of light is strongest in rgb(59, 73, 176)? (a) red (b) green (c) blue
  10. 10.🌈 Which hex code is red? (a) #ffff00 (b) #00ffff (c) #ff00ff (d) #ff0000
  11. 11.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #0000ff (d) #00ffff
  12. 12.🌈 Which colour of light is strongest in rgb(65, 217, 4)? (a) blue (b) red (c) green
  13. 13.🌈 Which hex code is black? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #000000
  14. 14.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #ffffff
  15. 15.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) cyan (c) white (d) bright green
  16. 16.🌈 Which colour is #ffff00? (a) black (b) white (c) red (d) yellow
  17. 17.🌈 Which colour of light is strongest in rgb(109, 211, 42)? (a) green (b) blue (c) red
  18. 18.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #000000
  19. 19.🌈 Which colour of light is strongest in rgb(65, 151, 124)? (a) green (b) blue (c) red
  20. 20.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) magenta (d) black
  21. 21.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  23. 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  24. 24.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) red (d) white
  25. 25.🌈 Which hex code is white? (a) #ffffff (b) #00ffff (c) #000000 (d) #ff00ff
  26. 26.🌈 Which colour is #00ff00? (a) black (b) blue (c) bright green (d) magenta
  27. 27.🌈 Which colour of light is strongest in rgb(59, 84, 171)? (a) red (b) green (c) blue
  28. 28.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) white (d) red
  29. 29.🌈 In #460000 the red part is the hex number 46. What is it as a normal number?
  30. 30.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
  31. 31.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) white (d) bright green
  32. 32.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) magenta (c) yellow (d) cyan
  34. 34.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
  35. 35.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #00ffff
  36. 36.🌈 In #0000c2 the blue part is the hex number c2. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(121, 8, 254)? (a) green (b) blue (c) red
  38. 38.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) white (d) cyan
  39. 39.🌈 In #7a0000 the red part is the hex number 7a. What is it as a normal number?
  40. 40.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?

Answer key

  1. 3
  2. red
  3. 58
  4. red
  5. green
  6. magenta
  7. blue
  8. blue
  9. blue
  10. #ff0000
  11. #00ffff
  12. green
  13. #000000
  14. #ff00ff
  15. white
  16. yellow
  17. green
  18. #0000ff
  19. green
  20. cyan
  21. 78
  22. 255
  23. F
  24. bright green
  25. #ffffff
  26. bright green
  27. blue
  28. white
  29. 70
  30. 241
  31. magenta
  32. 196
  33. yellow
  34. 51
  35. #ffff00
  36. 194
  37. blue
  38. blue
  39. 122
  40. 3

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