← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 45 · 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 colour of light is strongest in rgb(14, 122, 174)? (a) green (b) blue (c) red
  2. 2.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
  3. 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
  5. 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
  7. 7.🌈 In #dc0000 the red part is the hex number dc. What is it as a normal number?
  8. 8.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #ffffff
  9. 9.🌈 Which colour of light is strongest in rgb(234, 99, 53)? (a) green (b) blue (c) red
  10. 10.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) bright green (d) magenta
  11. 11.🌈 In #0000e9 the blue part is the hex number e9. What is it as a normal number?
  12. 12.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) bright green (d) red
  13. 13.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
  14. 14.🌈 Which colour is #ff0000? (a) yellow (b) black (c) red (d) magenta
  15. 15.🌈 Which colour of light is strongest in rgb(247, 61, 107)? (a) blue (b) green (c) red
  16. 16.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) magenta (c) cyan (d) yellow
  17. 17.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) magenta (c) red (d) bright green
  18. 18.🌈 Which colour is #00ff00? (a) red (b) black (c) white (d) bright green
  19. 19.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  21. 21.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
  22. 22.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #ff0000
  23. 23.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) yellow (d) red
  24. 24.🌈 In #ad0000 the red part is the hex number ad. What is it as a normal number?
  25. 25.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) red (d) bright green
  26. 26.🌈 Which colour is #0000ff? (a) blue (b) magenta (c) bright green (d) red
  27. 27.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff00ff (c) #ff0000 (d) #ffffff
  28. 28.🌈 Which colour of light is strongest in rgb(41, 187, 4)? (a) red (b) green (c) blue
  29. 29.🌈 Which hex code is cyan? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ff0000
  30. 30.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
  31. 31.🌈 Which colour of light is strongest in rgb(99, 152, 124)? (a) blue (b) green (c) red
  32. 32.🌈 Which colour of light is strongest in rgb(128, 239, 82)? (a) green (b) blue (c) red
  33. 33.🌈 In #540000 the red part is the hex number 54. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(98, 24, 181)? (a) red (b) green (c) blue
  35. 35.🌈 Which colour of light is strongest in rgb(54, 16, 206)? (a) green (b) blue (c) red
  36. 36.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) yellow (c) black (d) bright green
  37. 37.🌈 In #00003b the blue part is the hex number 3b. What is it as a normal number?
  38. 38.🌈 Which colour is #ffffff? (a) yellow (b) blue (c) red (d) white
  39. 39.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #000000
  40. 40.🌈 In #020000 the red part is the hex number 02. What is it as a normal number?

Answer key

  1. blue
  2. 37
  3. 3
  4. 255
  5. F
  6. blue
  7. 220
  8. #ff00ff
  9. red
  10. cyan
  11. 233
  12. magenta
  13. 153
  14. red
  15. red
  16. cyan
  17. red
  18. bright green
  19. 66
  20. red
  21. 1
  22. #00ff00
  23. blue
  24. 173
  25. white
  26. blue
  27. #ffff00
  28. green
  29. #00ffff
  30. 67
  31. green
  32. green
  33. 84
  34. blue
  35. blue
  36. black
  37. 59
  38. white
  39. #ffffff
  40. 2

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