← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 109 · 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 #000036 the blue part is the hex number 36. What is it as a normal number?
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) cyan (d) blue
  3. 3.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  5. 5.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) white (d) red
  6. 6.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) white (c) yellow (d) black
  7. 7.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
  8. 8.🌈 Which colour is #ffffff? (a) black (b) yellow (c) magenta (d) white
  9. 9.🌈 Which colour of light is strongest in rgb(121, 251, 65)? (a) blue (b) green (c) red
  10. 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  11. 11.🌈 Which hex code is bright green? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #00ff00
  12. 12.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ffff
  13. 13.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #ffff00 (d) #ff00ff
  14. 14.🌈 In #000018 the blue part is the hex number 18. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) cyan (d) blue
  16. 16.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) bright green (d) red
  17. 17.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #ffffff (d) #0000ff
  18. 18.🌈 Which colour of light is strongest in rgb(92, 17, 171)? (a) green (b) red (c) blue
  19. 19.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) blue (d) magenta
  20. 20.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
  21. 21.🌈 Which colour of light is strongest in rgb(211, 29, 90)? (a) green (b) red (c) blue
  22. 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
  23. 23.🌈 In #00a800 the green part is the hex number a8. What is it as a normal number?
  24. 24.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #00ffff (d) #ff0000
  25. 25.🌈 Which hex code is cyan? (a) #000000 (b) #00ff00 (c) #ffffff (d) #00ffff
  26. 26.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) bright green (c) white (d) black
  27. 27.🌈 Which colour of light is strongest in rgb(204, 41, 48)? (a) green (b) red (c) blue
  28. 28.🌈 Which colour of light is strongest in rgb(185, 117, 101)? (a) blue (b) red (c) green
  29. 29.🌈 In #008f00 the green part is the hex number 8f. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(151, 129, 67)? (a) green (b) blue (c) red
  31. 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
  32. 32.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) red (c) cyan (d) blue
  33. 33.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ff0000
  34. 34.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) magenta (d) black
  35. 35.🌈 Which colour of light is strongest in rgb(68, 185, 42)? (a) green (b) red (c) blue
  36. 36.🌈 Which colour is #ff0000? (a) cyan (b) red (c) blue (d) bright green
  37. 37.🌈 In #001700 the green part is the hex number 17. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(2, 61, 161)? (a) blue (b) red (c) green
  39. 39.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) black (d) cyan
  40. 40.🌈 In #000031 the blue part is the hex number 31. What is it as a normal number?

Answer key

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

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