← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 171 · 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) 2 (b) 6 (c) 4 (d) 3
  2. 2.🌈 Which hex code is red? (a) #000000 (b) #0000ff (c) #ff0000 (d) #ffff00
  3. 3.🌈 Which colour is #0000ff? (a) black (b) blue (c) white (d) red
  4. 4.🌈 Which colour of light is strongest in rgb(99, 232, 11)? (a) green (b) blue (c) red
  5. 5.🌈 In #00001f the blue part is the hex number 1f. What is it as a normal number?
  6. 6.🌈 Which colour is #ff00ff? (a) cyan (b) blue (c) black (d) magenta
  7. 7.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
  8. 8.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #ffffff (d) #000000
  9. 9.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #000000 (d) #00ff00
  10. 10.🌈 Which colour of light is strongest in rgb(0, 197, 116)? (a) green (b) red (c) blue
  11. 11.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) green (d) red
  12. 12.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) bright green (c) white (d) cyan
  13. 13.🌈 In #000071 the blue part is the hex number 71. What is it as a normal number?
  14. 14.🌈 Which colour is #ff0000? (a) magenta (b) bright green (c) black (d) red
  15. 15.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
  16. 16.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #0000ff (d) #ffffff
  17. 17.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #0000ff
  18. 18.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  19. 19.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  20. 20.🌈 Which colour of light is strongest in rgb(174, 39, 96)? (a) red (b) green (c) blue
  21. 21.🌈 Which colour is #ffffff? (a) black (b) blue (c) red (d) white
  22. 22.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ffff (d) #0000ff
  23. 23.🌈 Which colour of light is strongest in rgb(205, 102, 62)? (a) blue (b) red (c) green
  24. 24.🌈 Which colour of light is strongest in rgb(157, 131, 139)? (a) red (b) green (c) blue
  25. 25.🌈 Which colour of light is strongest in rgb(12, 16, 154)? (a) blue (b) red (c) green
  26. 26.🌈 Which colour is #00ff00? (a) white (b) red (c) blue (d) bright green
  27. 27.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffffff (d) #00ff00
  28. 28.🌈 In #009c00 the green part is the hex number 9c. What is it as a normal number?
  29. 29.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) white (c) blue (d) bright green
  30. 30.🌈 Which colour of light is strongest in rgb(119, 192, 120)? (a) red (b) blue (c) green
  31. 31.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
  32. 32.🌈 Which colour is #000000? (a) magenta (b) blue (c) cyan (d) black
  33. 33.🌈 Which colour is #00ffff? (a) white (b) cyan (c) bright green (d) blue
  34. 34.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
  35. 35.🌈 Which hex code is bright green? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #00ffff
  36. 36.🌈 Which colour of light is strongest in rgb(26, 102, 240)? (a) blue (b) green (c) red
  37. 37.🌈 Which colour of light is strongest in rgb(255, 28, 58)? (a) green (b) blue (c) red
  38. 38.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
  39. 39.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(164, 51, 44)? (a) green (b) red (c) blue

Answer key

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

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