← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 138 · 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(0, 0, 255)? (a) magenta (b) red (c) blue (d) bright green
  2. 2.🌈 Which colour is #000000? (a) red (b) cyan (c) black (d) bright green
  3. 3.🌈 Which colour is #0000ff? (a) red (b) bright green (c) black (d) blue
  4. 4.🌈 Which colour is #00ff00? (a) white (b) bright green (c) red (d) magenta
  5. 5.🌈 Which colour is #ff0000? (a) cyan (b) magenta (c) red (d) black
  6. 6.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #000000
  7. 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  8. 8.🌈 In #e10000 the red part is the hex number e1. What is it as a normal number?
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  10. 10.🌈 Which colour of light is strongest in rgb(30, 39, 253)? (a) green (b) blue (c) red
  11. 11.🌈 Which colour of light is strongest in rgb(70, 3, 181)? (a) blue (b) red (c) green
  12. 12.🌈 In #00b000 the green part is the hex number b0. What is it as a normal number?
  13. 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
  14. 14.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) white (d) green
  15. 15.🌈 Which colour is #ff00ff? (a) white (b) bright green (c) blue (d) magenta
  16. 16.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  17. 17.🌈 Which hex code is bright green? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #00ffff
  18. 18.🌈 Which colour is #00ffff? (a) white (b) cyan (c) blue (d) magenta
  19. 19.🌈 Which hex code is red? (a) #000000 (b) #ffffff (c) #00ffff (d) #ff0000
  20. 20.🌈 In #000006 the blue part is the hex number 06. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(246, 28, 17)? (a) green (b) red (c) blue
  22. 22.🌈 Which colour of light is strongest in rgb(35, 8, 179)? (a) green (b) red (c) blue
  23. 23.🌈 Which colour of light is strongest in rgb(226, 47, 9)? (a) red (b) green (c) blue
  24. 24.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #00ff00 (d) #ff00ff
  25. 25.🌈 Which colour of light is strongest in rgb(28, 165, 67)? (a) blue (b) green (c) red
  26. 26.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #000000 (d) #ff0000
  27. 27.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) magenta (c) red (d) bright green
  28. 28.🌈 Which colour of light is strongest in rgb(90, 189, 110)? (a) blue (b) red (c) green
  29. 29.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) blue (c) white (d) red
  30. 30.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
  31. 31.🌈 In #004600 the green part is the hex number 46. What is it as a normal number?
  32. 32.🌈 In #00001d the blue part is the hex number 1d. What is it as a normal number?
  33. 33.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
  34. 34.🌈 Which colour is #ffffff? (a) white (b) red (c) bright green (d) black
  35. 35.🌈 Which colour of light is strongest in rgb(9, 225, 83)? (a) blue (b) green (c) red
  36. 36.🌈 Which colour of light is strongest in rgb(73, 235, 124)? (a) blue (b) green (c) red
  37. 37.🌈 Which hex code is black? (a) #ff00ff (b) #00ffff (c) #ff0000 (d) #000000
  38. 38.🌈 In #000085 the blue part is the hex number 85. What is it as a normal number?
  39. 39.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
  40. 40.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) magenta (d) yellow

Answer key

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

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