← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 234 · 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 #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
  2. 2.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) white (d) bright green
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  4. 4.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) black (c) magenta (d) yellow
  5. 5.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
  6. 6.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
  7. 7.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) blue
  8. 8.🌈 Which colour of light is strongest in rgb(57, 221, 26)? (a) red (b) blue (c) green
  9. 9.🌈 Which colour is #ff00ff? (a) bright green (b) red (c) white (d) magenta
  10. 10.🌈 Which colour is #ffff00? (a) red (b) yellow (c) bright green (d) blue
  11. 11.🌈 Which colour of light is strongest in rgb(35, 92, 179)? (a) green (b) red (c) blue
  12. 12.🌈 Which colour is #00ffff? (a) bright green (b) yellow (c) cyan (d) white
  13. 13.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) yellow (c) red (d) bright green
  14. 14.🌈 Which colour of light is strongest in rgb(0, 210, 12)? (a) blue (b) red (c) green
  15. 15.🌈 Which colour is #ff0000? (a) black (b) bright green (c) white (d) red
  16. 16.🌈 In #00004a the blue part is the hex number 4a. What is it as a normal number?
  17. 17.🌈 Which colour of light is strongest in rgb(6, 55, 255)? (a) blue (b) green (c) red
  18. 18.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) red (c) bright green (d) blue
  19. 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  20. 20.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #ffffff (d) #00ffff
  21. 21.🌈 Which colour of light is strongest in rgb(225, 42, 132)? (a) red (b) blue (c) green
  22. 22.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #000000 (d) #0000ff
  23. 23.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #00ff00 (d) #ffffff
  24. 24.🌈 Which colour of light is strongest in rgb(203, 55, 54)? (a) green (b) red (c) blue
  25. 25.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) red (c) black (d) yellow
  26. 26.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) black (d) blue
  27. 27.🌈 Which colour of light is strongest in rgb(243, 38, 23)? (a) red (b) green (c) blue
  28. 28.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
  29. 29.🌈 Which colour is #0000ff? (a) red (b) magenta (c) cyan (d) blue
  30. 30.🌈 Which colour of light is strongest in rgb(169, 8, 64)? (a) red (b) green (c) blue
  31. 31.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) white (c) bright green (d) magenta
  32. 32.🌈 Which colour of light is strongest in rgb(161, 71, 125)? (a) red (b) blue (c) green
  33. 33.🌈 Which colour of light is strongest in rgb(188, 9, 57)? (a) red (b) blue (c) green
  34. 34.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #00ffff (d) #0000ff
  35. 35.🌈 Which colour of light is strongest in rgb(24, 114, 170)? (a) red (b) blue (c) green
  36. 36.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?
  37. 37.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
  38. 38.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ff0000
  39. 39.🌈 Which colour of light is strongest in rgb(98, 2, 160)? (a) red (b) blue (c) green
  40. 40.🌈 Which colour of light is strongest in rgb(0, 37, 248)? (a) red (b) blue (c) green

Answer key

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

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