← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 331 · 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.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) cyan (c) blue (d) bright green
  3. 3.🌈 Which colour is #ffff00? (a) black (b) magenta (c) bright green (d) yellow
  4. 4.🌈 In #004a00 the green part is the hex number 4a. What is it as a normal number?
  5. 5.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) bright green (c) magenta (d) white
  6. 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
  7. 7.🌈 Which colour is #00ff00? (a) blue (b) magenta (c) bright green (d) red
  8. 8.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) bright green (c) magenta (d) yellow
  9. 9.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #ff00ff (d) #000000
  10. 10.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  11. 11.🌈 Which colour is #00ffff? (a) bright green (b) red (c) white (d) cyan
  12. 12.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #00ffff (d) #00ff00
  13. 13.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #000000 (d) #ff00ff
  14. 14.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  15. 15.🌈 In #0000d9 the blue part is the hex number d9. What is it as a normal number?
  16. 16.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #ffff00
  17. 17.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) blue (c) red (d) cyan
  18. 18.🌈 Which colour is #0000ff? (a) white (b) black (c) blue (d) red
  19. 19.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ffffff
  20. 20.🌈 Which colour is #000000? (a) magenta (b) red (c) black (d) yellow
  21. 21.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
  22. 22.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff00ff (d) #ffffff
  23. 23.🌈 Which colour of light is strongest in rgb(46, 48, 187)? (a) red (b) green (c) blue
  24. 24.🌈 Which hex code is black? (a) #00ff00 (b) #0000ff (c) #000000 (d) #ff0000
  25. 25.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
  26. 26.🌈 Which colour is #ff0000? (a) cyan (b) black (c) blue (d) red
  27. 27.🌈 Which colour of light is strongest in rgb(14, 197, 35)? (a) red (b) blue (c) green
  28. 28.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) yellow (c) cyan (d) red
  29. 29.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) magenta (c) red (d) black
  30. 30.🌈 In #000040 the blue part is the hex number 40. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(118, 1, 194)? (a) red (b) green (c) blue
  32. 32.🌈 Which colour of light is strongest in rgb(140, 215, 32)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour of light is strongest in rgb(111, 33, 232)? (a) green (b) red (c) blue
  34. 34.🌈 Which colour of light is strongest in rgb(43, 176, 45)? (a) green (b) red (c) blue
  35. 35.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
  36. 36.🌈 Which colour of light is strongest in rgb(174, 97, 30)? (a) green (b) red (c) blue
  37. 37.🌈 In #004000 the green part is the hex number 40. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(215, 18, 86)? (a) blue (b) green (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(218, 8, 117)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(170, 136, 43)? (a) blue (b) green (c) red

Answer key

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

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