← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 23 · 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 last two digits give? (a) white (b) blue (c) green (d) red
  2. 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #ff0000
  3. 3.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) red (d) blue
  4. 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  5. 5.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
  7. 7.🌈 Which colour is #ffff00? (a) red (b) bright green (c) yellow (d) blue
  8. 8.🌈 Which colour is #0000ff? (a) white (b) black (c) blue (d) bright green
  9. 9.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) yellow (c) red (d) blue
  10. 10.🌈 In #560000 the red part is the hex number 56. What is it as a normal number?
  11. 11.🌈 Which colour of light is strongest in rgb(159, 94, 31)? (a) green (b) blue (c) red
  12. 12.🌈 Which colour is #ffffff? (a) black (b) red (c) blue (d) white
  13. 13.🌈 Which hex code is black? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #000000
  14. 14.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) red (d) magenta
  15. 15.🌈 In #000031 the blue part is the hex number 31. What is it as a normal number?
  16. 16.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) cyan (d) black
  17. 17.🌈 Which hex code is blue? (a) #ff00ff (b) #0000ff (c) #ff0000 (d) #00ffff
  18. 18.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #00ff00
  19. 19.🌈 Which colour of light is strongest in rgb(27, 50, 174)? (a) green (b) red (c) blue
  20. 20.🌈 Which colour is #ff0000? (a) black (b) blue (c) red (d) magenta
  21. 21.🌈 Which colour of light is strongest in rgb(88, 238, 1)? (a) green (b) red (c) blue
  22. 22.🌈 Which colour of light is strongest in rgb(27, 169, 77)? (a) green (b) blue (c) red
  23. 23.🌈 Which colour of light is strongest in rgb(240, 5, 65)? (a) green (b) red (c) blue
  24. 24.🌈 In #0000f8 the blue part is the hex number f8. What is it as a normal number?
  25. 25.🌈 In #009100 the green part is the hex number 91. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) magenta (d) white
  27. 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  28. 28.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #000000
  29. 29.🌈 In #ca0000 the red part is the hex number ca. What is it as a normal number?
  30. 30.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #000000 (d) #00ff00
  31. 31.🌈 In #00005c the blue part is the hex number 5c. What is it as a normal number?
  32. 32.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) yellow (c) bright green (d) magenta
  34. 34.🌈 Which colour of light is strongest in rgb(250, 54, 121)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(72, 26, 195)? (a) blue (b) green (c) red
  36. 36.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ffff
  37. 37.🌈 Which hex code is cyan? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ffffff
  38. 38.🌈 Which colour is #00ff00? (a) magenta (b) yellow (c) bright green (d) blue
  39. 39.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) cyan (c) white (d) red
  40. 40.🌈 Which colour of light is strongest in rgb(242, 118, 10)? (a) red (b) green (c) blue

Answer key

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

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