← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 242 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  2. 2.🌈 Which colour is #00ff00? (a) blue (b) black (c) bright green (d) magenta
  3. 3.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) black (c) yellow (d) red
  4. 4.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) magenta (c) blue (d) black
  5. 5.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
  6. 6.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
  7. 7.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) cyan (d) red
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  9. 9.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) black (c) yellow (d) white
  10. 10.🌈 Which hex code is yellow? (a) #ff0000 (b) #000000 (c) #0000ff (d) #ffff00
  11. 11.🌈 Which hex code is cyan? (a) #0000ff (b) #00ff00 (c) #00ffff (d) #ffff00
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  14. 14.🌈 Which colour is #ffff00? (a) yellow (b) cyan (c) black (d) red
  15. 15.🌈 In #550000 the red part is the hex number 55. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) white (c) red (d) cyan
  17. 17.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) magenta (c) yellow (d) white
  18. 18.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #00ff00 (d) #00ffff
  19. 19.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) bright green (c) blue (d) red
  20. 20.🌈 Which colour of light is strongest in rgb(196, 104, 83)? (a) blue (b) green (c) red
  21. 21.🌈 Which colour is #000000? (a) bright green (b) red (c) black (d) blue
  22. 22.🌈 Which colour is #ff0000? (a) blue (b) bright green (c) black (d) red
  23. 23.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(186, 25, 6)? (a) green (b) blue (c) red
  25. 25.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) black (d) yellow
  26. 26.🌈 Which colour of light is strongest in rgb(92, 44, 246)? (a) red (b) green (c) blue
  27. 27.🌈 Which colour of light is strongest in rgb(131, 178, 13)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) cyan (d) blue
  29. 29.🌈 Which colour of light is strongest in rgb(83, 229, 105)? (a) red (b) green (c) blue
  30. 30.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  31. 31.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
  32. 32.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
  33. 33.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) cyan (c) red (d) black
  34. 34.🌈 Which hex code is red? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #ff0000
  35. 35.🌈 In #00ed00 the green part is the hex number ed. What is it as a normal number?
  36. 36.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) magenta (d) white
  37. 37.🌈 In #650000 the red part is the hex number 65. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(122, 239, 21)? (a) red (b) blue (c) green
  39. 39.🌈 Which hex code is black? (a) #000000 (b) #00ff00 (c) #ff0000 (d) #0000ff
  40. 40.🌈 Which colour of light is strongest in rgb(23, 194, 72)? (a) blue (b) green (c) red

Answer key

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

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