← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 1 · 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.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
  2. 2.🌈 Which colour of light is strongest in rgb(53, 217, 54)? (a) green (b) red (c) blue
  3. 3.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) magenta (d) red
  4. 4.🌈 Which colour is #ffff00? (a) blue (b) red (c) white (d) yellow
  5. 5.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
  6. 6.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #ffff00
  7. 7.🌈 Which colour of light is strongest in rgb(228, 51, 125)? (a) red (b) green (c) blue
  8. 8.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #000000 (d) #00ff00
  9. 9.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  10. 10.🌈 Which hex code is bright green? (a) #0000ff (b) #000000 (c) #ff00ff (d) #00ff00
  11. 11.🌈 Which colour of light is strongest in rgb(210, 69, 120)? (a) green (b) blue (c) red
  12. 12.🌈 Which colour is #00ffff? (a) cyan (b) red (c) yellow (d) bright green
  13. 13.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) red (c) black (d) cyan
  14. 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
  15. 15.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) black (c) magenta (d) bright green
  16. 16.🌈 Which colour of light is strongest in rgb(15, 164, 70)? (a) red (b) blue (c) green
  17. 17.🌈 Which colour of light is strongest in rgb(53, 48, 158)? (a) green (b) red (c) blue
  18. 18.🌈 Which colour is #00ff00? (a) magenta (b) cyan (c) white (d) bright green
  19. 19.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) cyan (c) bright green (d) magenta
  20. 20.🌈 Which colour of light is strongest in rgb(70, 16, 227)? (a) red (b) green (c) blue
  21. 21.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) magenta (c) bright green (d) black
  22. 22.🌈 Which colour of light is strongest in rgb(66, 174, 0)? (a) green (b) red (c) blue
  23. 23.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  24. 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
  25. 25.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
  26. 26.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) cyan (c) red (d) white
  27. 27.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
  28. 28.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
  29. 29.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ff00ff
  30. 30.🌈 Which colour of light is strongest in rgb(106, 38, 246)? (a) green (b) blue (c) red
  31. 31.🌈 In #0e0000 the red part is the hex number 0e. What is it as a normal number?
  32. 32.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #0000ff
  33. 33.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #00ffff
  34. 34.🌈 Which colour of light is strongest in rgb(78, 115, 162)? (a) blue (b) red (c) green
  35. 35.🌈 In #000023 the blue part is the hex number 23. What is it as a normal number?
  36. 36.🌈 Which colour of light is strongest in rgb(13, 83, 233)? (a) red (b) blue (c) green
  37. 37.🌈 Which colour of light is strongest in rgb(172, 47, 19)? (a) green (b) blue (c) red
  38. 38.🌈 In #0000b1 the blue part is the hex number b1. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(225, 24, 48)? (a) green (b) red (c) blue
  40. 40.🌈 In #970000 the red part is the hex number 97. What is it as a normal number?

Answer key

  1. 133
  2. green
  3. bright green
  4. yellow
  5. 213
  6. #00ffff
  7. red
  8. #ff0000
  9. red
  10. #00ff00
  11. red
  12. cyan
  13. cyan
  14. F
  15. magenta
  16. green
  17. blue
  18. bright green
  19. yellow
  20. blue
  21. black
  22. green
  23. blue
  24. 3
  25. 179
  26. red
  27. 255
  28. 116
  29. #0000ff
  30. blue
  31. 14
  32. #ff00ff
  33. #ffffff
  34. blue
  35. 35
  36. blue
  37. red
  38. 177
  39. red
  40. 151

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