← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 281 · 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 #000056 the blue part is the hex number 56. What is it as a normal number?
  2. 2.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #00ffff
  3. 3.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff0000 (c) #0000ff (d) #00ffff
  4. 4.🌈 In #00f400 the green part is the hex number f4. What is it as a normal number?
  5. 5.🌈 Which colour is #00ff00? (a) red (b) blue (c) bright green (d) magenta
  6. 6.🌈 In #af0000 the red part is the hex number af. What is it as a normal number?
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  8. 8.🌈 Which colour is #ffffff? (a) blue (b) red (c) white (d) cyan
  9. 9.🌈 Which colour of light is strongest in rgb(177, 8, 44)? (a) blue (b) green (c) red
  10. 10.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) bright green (c) red (d) black
  11. 11.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) cyan (c) red (d) black
  12. 12.🌈 Which colour of light is strongest in rgb(172, 112, 130)? (a) red (b) green (c) blue
  13. 13.🌈 Which colour of light is strongest in rgb(197, 65, 45)? (a) green (b) blue (c) red
  14. 14.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) yellow (c) blue (d) black
  15. 15.🌈 Which colour of light is strongest in rgb(51, 31, 217)? (a) red (b) green (c) blue
  16. 16.🌈 Which colour of light is strongest in rgb(178, 54, 37)? (a) red (b) blue (c) green
  17. 17.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  18. 18.🌈 Which hex code is blue? (a) #ff00ff (b) #ffff00 (c) #0000ff (d) #ff0000
  19. 19.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  20. 20.🌈 Which colour is #000000? (a) white (b) yellow (c) red (d) black
  21. 21.🌈 Which colour is #ffff00? (a) white (b) red (c) yellow (d) bright green
  22. 22.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) red (d) yellow
  23. 23.🌈 Which colour of light is strongest in rgb(251, 18, 93)? (a) green (b) red (c) blue
  24. 24.🌈 Which colour of light is strongest in rgb(45, 130, 157)? (a) green (b) red (c) blue
  25. 25.🌈 In #000023 the blue part is the hex number 23. What is it as a normal number?
  26. 26.🌈 In #0000e4 the blue part is the hex number e4. What is it as a normal number?
  27. 27.🌈 In #00007b the blue part is the hex number 7b. What is it as a normal number?
  28. 28.🌈 Which colour of light is strongest in rgb(60, 74, 163)? (a) blue (b) red (c) green
  29. 29.🌈 In #4a0000 the red part is the hex number 4a. What is it as a normal number?
  30. 30.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) red (d) cyan
  31. 31.🌈 Which colour of light is strongest in rgb(166, 13, 74)? (a) green (b) blue (c) red
  32. 32.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  33. 33.🌈 Which colour of light is strongest in rgb(103, 25, 185)? (a) red (b) blue (c) green
  34. 34.🌈 Which hex code is bright green? (a) #00ffff (b) #0000ff (c) #00ff00 (d) #ffffff
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) cyan (c) yellow (d) black
  36. 36.🌈 In #006600 the green part is the hex number 66. What is it as a normal number?
  37. 37.🌈 Which colour is #0000ff? (a) red (b) blue (c) bright green (d) cyan
  38. 38.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) magenta (c) black (d) white
  39. 39.🌈 Which colour of light is strongest in rgb(74, 186, 96)? (a) green (b) red (c) blue
  40. 40.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z

Answer key

  1. 86
  2. #00ffff
  3. #ffff00
  4. 244
  5. bright green
  6. 175
  7. 255
  8. white
  9. red
  10. bright green
  11. black
  12. red
  13. red
  14. blue
  15. blue
  16. red
  17. blue
  18. #0000ff
  19. red
  20. black
  21. yellow
  22. yellow
  23. red
  24. blue
  25. 35
  26. 228
  27. 123
  28. blue
  29. 74
  30. cyan
  31. red
  32. 3
  33. blue
  34. #00ff00
  35. red
  36. 102
  37. blue
  38. white
  39. green
  40. F

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