← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 199 · 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) #0000ff (b) #00ff00 (c) #ff0000 (d) #000000
  2. 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
  3. 3.🌈 In #910000 the red part is the hex number 91. What is it as a normal number?
  4. 4.🌈 Which colour of light is strongest in rgb(33, 227, 45)? (a) red (b) blue (c) green
  5. 5.🌈 Which hex code is red? (a) #0000ff (b) #000000 (c) #ff00ff (d) #ff0000
  6. 6.🌈 Which colour is #000000? (a) black (b) bright green (c) blue (d) magenta
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
  8. 8.🌈 In #00008c the blue part is the hex number 8c. What is it as a normal number?
  9. 9.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) magenta (c) cyan (d) white
  10. 10.🌈 Which colour is #00ffff? (a) blue (b) magenta (c) cyan (d) white
  11. 11.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  13. 13.🌈 In #bb0000 the red part is the hex number bb. What is it as a normal number?
  14. 14.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #0000ff (d) #ffffff
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) yellow (d) bright green
  17. 17.🌈 In #0000e0 the blue part is the hex number e0. What is it as a normal number?
  18. 18.🌈 Which colour is #00ff00? (a) black (b) bright green (c) white (d) cyan
  19. 19.🌈 Which colour is #ff00ff? (a) white (b) blue (c) cyan (d) magenta
  20. 20.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
  21. 21.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) yellow (d) white
  22. 22.🌈 Which colour of light is strongest in rgb(85, 115, 174)? (a) red (b) green (c) blue
  23. 23.🌈 Which colour of light is strongest in rgb(191, 10, 58)? (a) blue (b) green (c) red
  24. 24.🌈 In #0000a0 the blue part is the hex number a0. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) bright green (d) cyan
  26. 26.🌈 Which hex code is white? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #0000ff
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
  28. 28.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) yellow (d) cyan
  29. 29.🌈 Which hex code is bright green? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #000000
  30. 30.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) bright green (d) magenta
  31. 31.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
  32. 32.🌈 Which colour is #ff0000? (a) yellow (b) black (c) red (d) blue
  33. 33.🌈 In #001200 the green part is the hex number 12. What is it as a normal number?
  34. 34.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) white (c) magenta (d) bright green
  35. 35.🌈 Which colour of light is strongest in rgb(44, 247, 15)? (a) red (b) green (c) blue
  36. 36.🌈 In #aa0000 the red part is the hex number aa. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(97, 220, 59)? (a) green (b) red (c) blue
  38. 38.🌈 Which colour of light is strongest in rgb(218, 26, 87)? (a) green (b) blue (c) red
  39. 39.🌈 Which colour of light is strongest in rgb(38, 43, 171)? (a) blue (b) green (c) red
  40. 40.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ff00ff

Answer key

  1. #0000ff
  2. 3
  3. 145
  4. green
  5. #ff0000
  6. black
  7. red
  8. 140
  9. white
  10. cyan
  11. 210
  12. F
  13. 187
  14. #ff00ff
  15. 255
  16. blue
  17. 224
  18. bright green
  19. magenta
  20. 12
  21. blue
  22. blue
  23. red
  24. 160
  25. cyan
  26. #ffffff
  27. blue
  28. red
  29. #00ff00
  30. black
  31. 40
  32. red
  33. 18
  34. bright green
  35. green
  36. 170
  37. green
  38. red
  39. blue
  40. #000000

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