← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 295 · 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 of light is strongest in rgb(105, 161, 55)? (a) green (b) red (c) blue
  2. 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #00ff00 (d) #ffffff
  3. 3.🌈 Which hex code is cyan? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #00ffff
  4. 4.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  6. 6.🌈 Which colour of light is strongest in rgb(109, 201, 106)? (a) blue (b) red (c) green
  7. 7.🌈 Which colour is #ff0000? (a) white (b) bright green (c) red (d) yellow
  8. 8.🌈 Which hex code is blue? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ffff00
  9. 9.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #ffff00 (d) #ff00ff
  10. 10.🌈 Which colour of light is strongest in rgb(243, 84, 115)? (a) red (b) blue (c) green
  11. 11.🌈 Which colour is #ff00ff? (a) black (b) cyan (c) magenta (d) bright green
  12. 12.🌈 Which colour of light is strongest in rgb(58, 203, 128)? (a) blue (b) green (c) red
  13. 13.🌈 Which colour of light is strongest in rgb(212, 106, 23)? (a) blue (b) green (c) red
  14. 14.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) black (c) cyan (d) white
  16. 16.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) cyan (c) bright green (d) yellow
  17. 17.🌈 Which colour is #00ff00? (a) black (b) cyan (c) blue (d) bright green
  18. 18.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffffff (c) #00ffff (d) #ffff00
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) white (c) red (d) magenta
  20. 20.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #00ff00
  21. 21.🌈 Which colour is #ffff00? (a) bright green (b) cyan (c) yellow (d) black
  22. 22.🌈 In #00fa00 the green part is the hex number fa. What is it as a normal number?
  23. 23.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
  24. 24.🌈 In #000007 the blue part is the hex number 07. What is it as a normal number?
  25. 25.🌈 In #00006b the blue part is the hex number 6b. What is it as a normal number?
  26. 26.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) blue (c) cyan (d) red
  28. 28.🌈 In #009200 the green part is the hex number 92. What is it as a normal number?
  29. 29.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  30. 30.🌈 Which colour of light is strongest in rgb(238, 40, 12)? (a) blue (b) green (c) red
  31. 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  32. 32.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) magenta (c) blue (d) cyan
  33. 33.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(106, 124, 215)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour is #00ffff? (a) red (b) white (c) cyan (d) blue
  36. 36.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
  37. 37.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
  38. 38.🌈 In #000042 the blue part is the hex number 42. What is it as a normal number?
  39. 39.🌈 In #002b00 the green part is the hex number 2b. What is it as a normal number?
  40. 40.🌈 Which colour is #0000ff? (a) red (b) magenta (c) blue (d) cyan

Answer key

  1. green
  2. #ff00ff
  3. #00ffff
  4. 23
  5. 255
  6. green
  7. red
  8. #0000ff
  9. #000000
  10. red
  11. magenta
  12. green
  13. red
  14. 163
  15. white
  16. bright green
  17. bright green
  18. #ffff00
  19. red
  20. #ff0000
  21. yellow
  22. 250
  23. 228
  24. 7
  25. 107
  26. 62
  27. cyan
  28. 146
  29. 3
  30. red
  31. F
  32. yellow
  33. 71
  34. blue
  35. cyan
  36. red
  37. 241
  38. 66
  39. 43
  40. blue

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