← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 303 · 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 is rgb(255, 0, 255)? (a) black (b) magenta (c) cyan (d) yellow
  2. 2.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
  3. 3.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) bright green (c) cyan (d) black
  4. 4.🌈 In #270000 the red part is the hex number 27. What is it as a normal number?
  5. 5.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) bright green (c) black (d) yellow
  6. 6.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
  7. 7.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
  8. 8.🌈 Which colour of light is strongest in rgb(29, 189, 32)? (a) red (b) blue (c) green
  9. 9.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #00ff00 (d) #ffff00
  10. 10.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) bright green (d) yellow
  11. 11.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) blue (d) black
  12. 12.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) yellow (d) white
  13. 13.🌈 Which colour is #ffff00? (a) yellow (b) white (c) black (d) blue
  14. 14.🌈 Which colour of light is strongest in rgb(24, 37, 176)? (a) red (b) blue (c) green
  15. 15.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  16. 16.🌈 Which hex code is white? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #ff0000
  17. 17.🌈 In #0000ee the blue part is the hex number ee. What is it as a normal number?
  18. 18.🌈 Which colour is #ff0000? (a) blue (b) magenta (c) red (d) bright green
  19. 19.🌈 Which colour of light is strongest in rgb(182, 41, 65)? (a) red (b) blue (c) green
  20. 20.🌈 Which colour of light is strongest in rgb(61, 220, 18)? (a) red (b) green (c) blue
  21. 21.🌈 Which colour is #ffffff? (a) black (b) bright green (c) blue (d) white
  22. 22.🌈 Which colour of light is strongest in rgb(155, 37, 140)? (a) green (b) red (c) blue
  23. 23.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #0000ff
  24. 24.🌈 Which colour of light is strongest in rgb(138, 136, 250)? (a) red (b) blue (c) green
  25. 25.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
  26. 26.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) black (c) blue (d) bright green
  28. 28.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
  29. 29.🌈 In #00003b the blue part is the hex number 3b. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(28, 164, 56)? (a) red (b) blue (c) green
  31. 31.🌈 In #240000 the red part is the hex number 24. What is it as a normal number?
  32. 32.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
  33. 33.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
  34. 34.🌈 In #2f0000 the red part is the hex number 2f. What is it as a normal number?
  35. 35.🌈 Which colour of light is strongest in rgb(217, 60, 51)? (a) blue (b) red (c) green
  36. 36.🌈 Which hex code is blue? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #0000ff
  37. 37.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ffff
  38. 38.🌈 Which colour of light is strongest in rgb(9, 56, 175)? (a) blue (b) red (c) green
  39. 39.🌈 Which colour is #ff00ff? (a) red (b) bright green (c) black (d) magenta
  40. 40.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) cyan

Answer key

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

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