← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 35 · 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.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
  2. 2.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) black (c) white (d) red
  3. 3.🌈 Which colour of light is strongest in rgb(87, 151, 107)? (a) blue (b) green (c) red
  4. 4.🌈 Which colour of light is strongest in rgb(193, 14, 84)? (a) red (b) blue (c) green
  5. 5.🌈 Which colour is #00ffff? (a) blue (b) magenta (c) cyan (d) red
  6. 6.🌈 In #8e0000 the red part is the hex number 8e. What is it as a normal number?
  7. 7.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
  8. 8.🌈 Which colour is #000000? (a) black (b) magenta (c) white (d) yellow
  9. 9.🌈 Which colour of light is strongest in rgb(82, 181, 66)? (a) red (b) blue (c) green
  10. 10.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) cyan (d) yellow
  11. 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  12. 12.🌈 Which hex code is magenta? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #00ffff
  13. 13.🌈 Which colour is #ff0000? (a) white (b) yellow (c) bright green (d) red
  14. 14.🌈 Which colour of light is strongest in rgb(86, 188, 62)? (a) green (b) blue (c) red
  15. 15.🌈 In #0000a1 the blue part is the hex number a1. What is it as a normal number?
  16. 16.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) yellow (c) blue (d) magenta
  17. 17.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) red (c) cyan (d) yellow
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
  19. 19.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) yellow (c) white (d) magenta
  20. 20.🌈 Which hex code is bright green? (a) #ff00ff (b) #ff0000 (c) #00ff00 (d) #ffffff
  21. 21.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(14, 189, 34)? (a) blue (b) red (c) green
  23. 23.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #ff0000 (d) #0000ff
  24. 24.🌈 Which colour of light is strongest in rgb(99, 213, 96)? (a) red (b) blue (c) green
  25. 25.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffffff (c) #000000 (d) #ffff00
  26. 26.🌈 Which colour is #ff00ff? (a) blue (b) white (c) magenta (d) yellow
  27. 27.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
  28. 28.🌈 In #00cd00 the green part is the hex number cd. What is it as a normal number?
  29. 29.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 4 (d) 3
  30. 30.🌈 Which hex code is red? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #00ffff
  31. 31.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(140, 246, 30)? (a) red (b) green (c) blue
  33. 33.🌈 In #0000fb the blue part is the hex number fb. What is it as a normal number?
  34. 34.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) yellow (d) bright green
  35. 35.🌈 Which colour of light is strongest in rgb(22, 181, 139)? (a) green (b) blue (c) red
  36. 36.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
  37. 37.🌈 Which colour is #ffffff? (a) yellow (b) magenta (c) white (d) red
  38. 38.🌈 In #00f600 the green part is the hex number f6. What is it as a normal number?
  39. 39.🌈 In #240000 the red part is the hex number 24. What is it as a normal number?
  40. 40.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #ff0000 (d) #ffff00

Answer key

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

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