← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 229 · 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 black? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #000000
  2. 2.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) yellow (d) black
  3. 3.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) white (c) red (d) black
  4. 4.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) bright green (c) blue (d) magenta
  5. 5.🌈 Which colour is #ff0000? (a) bright green (b) yellow (c) red (d) cyan
  6. 6.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  8. 8.🌈 Which colour of light is strongest in rgb(173, 93, 97)? (a) blue (b) green (c) red
  9. 9.🌈 In #0000be the blue part is the hex number be. What is it as a normal number?
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
  11. 11.🌈 Which hex code is cyan? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #00ffff
  12. 12.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) black (d) white
  13. 13.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) black (d) yellow
  14. 14.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
  15. 15.🌈 Which colour of light is strongest in rgb(41, 22, 171)? (a) green (b) blue (c) red
  16. 16.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
  17. 17.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) yellow (d) cyan
  18. 18.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) magenta (c) black (d) blue
  19. 19.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #0000ff (d) #ffffff
  20. 20.🌈 Which colour of light is strongest in rgb(210, 85, 120)? (a) blue (b) red (c) green
  21. 21.🌈 Which colour is #0000ff? (a) red (b) black (c) blue (d) white
  22. 22.🌈 Which colour of light is strongest in rgb(28, 4, 233)? (a) green (b) red (c) blue
  23. 23.🌈 Which colour of light is strongest in rgb(27, 151, 46)? (a) blue (b) red (c) green
  24. 24.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
  25. 25.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #00ff00
  26. 26.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) white (d) yellow
  27. 27.🌈 In #320000 the red part is the hex number 32. What is it as a normal number?
  28. 28.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) red (d) blue
  29. 29.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) red (c) white (d) cyan
  30. 30.🌈 In #00005f the blue part is the hex number 5f. What is it as a normal number?
  31. 31.🌈 In #006200 the green part is the hex number 62. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(29, 31, 235)? (a) red (b) green (c) blue
  33. 33.🌈 Which colour is #000000? (a) black (b) bright green (c) magenta (d) red
  34. 34.🌈 Which colour of light is strongest in rgb(135, 190, 9)? (a) green (b) red (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(203, 122, 123)? (a) blue (b) red (c) green
  36. 36.🌈 In #f50000 the red part is the hex number f5. What is it as a normal number?
  37. 37.🌈 In #0000ea the blue part is the hex number ea. What is it as a normal number?
  38. 38.🌈 In #760000 the red part is the hex number 76. What is it as a normal number?
  39. 39.🌈 Which colour of light is strongest in rgb(151, 2, 100)? (a) blue (b) red (c) green
  40. 40.🌈 In #0000bf the blue part is the hex number bf. What is it as a normal number?

Answer key

  1. #000000
  2. white
  3. red
  4. magenta
  5. red
  6. 255
  7. red
  8. red
  9. 190
  10. 3
  11. #00ffff
  12. bright green
  13. blue
  14. 45
  15. blue
  16. blue
  17. magenta
  18. black
  19. #00ff00
  20. red
  21. blue
  22. blue
  23. green
  24. F
  25. #ffffff
  26. white
  27. 50
  28. bright green
  29. cyan
  30. 95
  31. 98
  32. blue
  33. black
  34. green
  35. red
  36. 245
  37. 234
  38. 118
  39. red
  40. 191

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