← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 297 · 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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 4 (d) 3
  2. 2.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
  3. 3.🌈 In #0000b2 the blue part is the hex number b2. What is it as a normal number?
  4. 4.🌈 Which hex code is cyan? (a) #ff0000 (b) #000000 (c) #ffff00 (d) #00ffff
  5. 5.🌈 Which hex code is white? (a) #ffffff (b) #000000 (c) #ffff00 (d) #ff0000
  6. 6.🌈 Which colour is #ff0000? (a) red (b) yellow (c) magenta (d) cyan
  7. 7.🌈 Which colour of light is strongest in rgb(57, 179, 6)? (a) red (b) green (c) blue
  8. 8.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #00ffff
  9. 9.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) magenta (c) blue (d) bright green
  10. 10.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) cyan (c) red (d) magenta
  11. 11.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
  12. 12.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  13. 13.🌈 Which colour is #000000? (a) bright green (b) magenta (c) black (d) blue
  14. 14.🌈 In #00008d the blue part is the hex number 8d. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) white (c) bright green (d) blue
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  17. 17.🌈 In #000002 the blue part is the hex number 02. What is it as a normal number?
  18. 18.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
  19. 19.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #0000ff
  20. 20.🌈 Which colour of light is strongest in rgb(32, 74, 226)? (a) green (b) red (c) blue
  21. 21.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) white (c) yellow (d) blue
  22. 22.🌈 Which colour is #ffffff? (a) red (b) blue (c) white (d) magenta
  23. 23.🌈 Which colour is #00ffff? (a) bright green (b) magenta (c) red (d) cyan
  24. 24.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #0000ff (d) #ff0000
  25. 25.🌈 Which colour of light is strongest in rgb(188, 29, 46)? (a) red (b) blue (c) green
  26. 26.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ffffff
  27. 27.🌈 In #000800 the green part is the hex number 08. What is it as a normal number?
  28. 28.🌈 Which colour is #00ff00? (a) bright green (b) black (c) white (d) magenta
  29. 29.🌈 Which colour of light is strongest in rgb(180, 84, 15)? (a) green (b) blue (c) red
  30. 30.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
  31. 31.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) red (d) magenta
  32. 32.🌈 Which hex code is black? (a) #00ffff (b) #000000 (c) #00ff00 (d) #0000ff
  33. 33.🌈 Which colour is #0000ff? (a) magenta (b) yellow (c) red (d) blue
  34. 34.🌈 Which colour is #ffff00? (a) yellow (b) red (c) cyan (d) bright green
  35. 35.🌈 Which colour of light is strongest in rgb(102, 231, 20)? (a) blue (b) green (c) red
  36. 36.🌈 In #000025 the blue part is the hex number 25. What is it as a normal number?
  37. 37.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
  38. 38.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
  39. 39.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #ff0000
  40. 40.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z

Answer key

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

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