← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 320 · 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) 1000 (b) 100 (c) 255 (d) 99
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  3. 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  4. 4.🌈 Which colour is #000000? (a) white (b) black (c) red (d) blue
  5. 5.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
  6. 6.🌈 Which colour of light is strongest in rgb(161, 8, 77)? (a) blue (b) green (c) red
  7. 7.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
  8. 8.🌈 Which colour of light is strongest in rgb(118, 220, 97)? (a) red (b) blue (c) green
  9. 9.🌈 In #008600 the green part is the hex number 86. What is it as a normal number?
  10. 10.🌈 Which colour is #ffff00? (a) magenta (b) black (c) blue (d) yellow
  11. 11.🌈 In #000046 the blue part is the hex number 46. What is it as a normal number?
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
  13. 13.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) black (d) yellow
  14. 14.🌈 In #b80000 the red part is the hex number b8. What is it as a normal number?
  15. 15.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ffffff
  16. 16.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #00ff00
  17. 17.🌈 Which colour is #ffffff? (a) red (b) white (c) cyan (d) magenta
  18. 18.🌈 Which hex code is yellow? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #ff0000
  19. 19.🌈 In #ba0000 the red part is the hex number ba. What is it as a normal number?
  20. 20.🌈 Which colour is #ff0000? (a) black (b) red (c) blue (d) bright green
  21. 21.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) blue (d) green
  22. 22.🌈 In #0000fa the blue part is the hex number fa. What is it as a normal number?
  23. 23.🌈 Which colour is #00ffff? (a) black (b) cyan (c) white (d) red
  24. 24.🌈 Which colour is #ff00ff? (a) bright green (b) black (c) magenta (d) white
  25. 25.🌈 Which colour of light is strongest in rgb(212, 122, 99)? (a) red (b) green (c) blue
  26. 26.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) white (c) blue (d) black
  27. 27.🌈 Which hex code is red? (a) #ff0000 (b) #000000 (c) #0000ff (d) #ff00ff
  28. 28.🌈 Which hex code is magenta? (a) #ffffff (b) #00ff00 (c) #ff00ff (d) #ffff00
  29. 29.🌈 Which colour of light is strongest in rgb(55, 164, 46)? (a) green (b) blue (c) red
  30. 30.🌈 Which colour of light is strongest in rgb(15, 212, 55)? (a) green (b) red (c) blue
  31. 31.🌈 In #00df00 the green part is the hex number df. What is it as a normal number?
  32. 32.🌈 In #0000a0 the blue part is the hex number a0. What is it as a normal number?
  33. 33.🌈 Which colour is #00ff00? (a) bright green (b) white (c) blue (d) black
  34. 34.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) magenta (d) bright green
  35. 35.🌈 In #00003c the blue part is the hex number 3c. What is it as a normal number?
  36. 36.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) magenta (c) blue (d) black
  37. 37.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) white (d) black
  38. 38.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) yellow (c) black (d) bright green
  39. 39.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
  40. 40.🌈 In #004200 the green part is the hex number 42. What is it as a normal number?

Answer key

  1. 255
  2. 3
  3. blue
  4. black
  5. 6
  6. red
  7. 33
  8. green
  9. 134
  10. yellow
  11. 70
  12. F
  13. red
  14. 184
  15. #00ffff
  16. #0000ff
  17. white
  18. #ffff00
  19. 186
  20. red
  21. red
  22. 250
  23. cyan
  24. magenta
  25. red
  26. magenta
  27. #ff0000
  28. #ff00ff
  29. green
  30. green
  31. 223
  32. 160
  33. bright green
  34. cyan
  35. 60
  36. blue
  37. black
  38. bright green
  39. 130
  40. 66

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