← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 113 · 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 hex code is blue? (a) #000000 (b) #0000ff (c) #00ffff (d) #ff0000
  2. 2.🌈 Which colour of light is strongest in rgb(13, 231, 3)? (a) blue (b) green (c) red
  3. 3.🌈 Which colour is #0000ff? (a) red (b) bright green (c) blue (d) magenta
  4. 4.🌈 Which colour of light is strongest in rgb(82, 85, 170)? (a) blue (b) red (c) green
  5. 5.🌈 In #000098 the blue part is the hex number 98. What is it as a normal number?
  6. 6.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
  9. 9.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  10. 10.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) magenta (c) black (d) white
  11. 11.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(3, 154, 89)? (a) green (b) blue (c) red
  13. 13.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
  14. 14.🌈 In #9e0000 the red part is the hex number 9e. What is it as a normal number?
  15. 15.🌈 Which colour of light is strongest in rgb(170, 54, 41)? (a) green (b) red (c) blue
  16. 16.🌈 Which hex code is red? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #00ff00
  17. 17.🌈 Which colour of light is strongest in rgb(127, 93, 161)? (a) red (b) green (c) blue
  18. 18.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
  19. 19.🌈 Which colour of light is strongest in rgb(77, 193, 20)? (a) red (b) blue (c) green
  20. 20.🌈 In #009500 the green part is the hex number 95. What is it as a normal number?
  21. 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  22. 22.🌈 In #00fc00 the green part is the hex number fc. What is it as a normal number?
  23. 23.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) white (c) cyan (d) red
  24. 24.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  25. 25.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #0000ff (d) #ff0000
  26. 26.🌈 In #9a0000 the red part is the hex number 9a. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(32, 37, 189)? (a) blue (b) red (c) green
  28. 28.🌈 Which colour is #00ff00? (a) yellow (b) cyan (c) black (d) bright green
  29. 29.🌈 Which colour of light is strongest in rgb(69, 216, 11)? (a) blue (b) green (c) red
  30. 30.🌈 In #002000 the green part is the hex number 20. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(43, 204, 88)? (a) blue (b) green (c) red
  32. 32.🌈 In #00de00 the green part is the hex number de. What is it as a normal number?
  33. 33.🌈 Which colour of light is strongest in rgb(68, 12, 226)? (a) blue (b) green (c) red
  34. 34.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #ffff00 (d) #0000ff
  35. 35.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) cyan (c) red (d) yellow
  36. 36.🌈 Which colour of light is strongest in rgb(245, 51, 78)? (a) red (b) green (c) blue
  37. 37.🌈 Which colour is #ffffff? (a) white (b) blue (c) black (d) red
  38. 38.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) bright green (d) red
  39. 39.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
  40. 40.🌈 Which colour is #000000? (a) black (b) cyan (c) bright green (d) blue

Answer key

  1. #0000ff
  2. green
  3. blue
  4. blue
  5. 152
  6. 1
  7. red
  8. F
  9. blue
  10. white
  11. 169
  12. green
  13. 243
  14. 158
  15. red
  16. #ff0000
  17. blue
  18. 55
  19. green
  20. 149
  21. 3
  22. 252
  23. cyan
  24. 255
  25. #ff00ff
  26. 154
  27. blue
  28. bright green
  29. green
  30. 32
  31. green
  32. 222
  33. blue
  34. #00ff00
  35. red
  36. red
  37. white
  38. magenta
  39. 133
  40. black

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