← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 77 · 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) 255 (c) 1000 (d) 99
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
  3. 3.🌈 Which colour of light is strongest in rgb(171, 112, 28)? (a) green (b) blue (c) red
  4. 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
  5. 5.🌈 Which colour of light is strongest in rgb(35, 209, 94)? (a) blue (b) green (c) red
  6. 6.🌈 Which colour is #ffffff? (a) white (b) cyan (c) yellow (d) black
  7. 7.🌈 Which colour is #ff0000? (a) black (b) cyan (c) red (d) magenta
  8. 8.🌈 Which colour is #0000ff? (a) blue (b) black (c) bright green (d) magenta
  9. 9.🌈 In #004a00 the green part is the hex number 4a. What is it as a normal number?
  10. 10.🌈 Which hex code is black? (a) #00ff00 (b) #ff00ff (c) #000000 (d) #ff0000
  11. 11.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) yellow (d) blue
  12. 12.🌈 Which colour is #00ff00? (a) black (b) bright green (c) white (d) blue
  13. 13.🌈 Which colour is #ff00ff? (a) magenta (b) blue (c) yellow (d) black
  14. 14.🌈 Which colour is #00ffff? (a) black (b) cyan (c) blue (d) yellow
  15. 15.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) magenta (d) blue
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  17. 17.🌈 In #000098 the blue part is the hex number 98. What is it as a normal number?
  18. 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
  19. 19.🌈 Which colour of light is strongest in rgb(126, 166, 111)? (a) red (b) green (c) blue
  20. 20.🌈 Which colour is #ffff00? (a) yellow (b) white (c) cyan (d) magenta
  21. 21.🌈 In #00009c the blue part is the hex number 9c. What is it as a normal number?
  22. 22.🌈 Which colour of light is strongest in rgb(127, 177, 101)? (a) red (b) blue (c) green
  23. 23.🌈 In #be0000 the red part is the hex number be. What is it as a normal number?
  24. 24.🌈 Which colour of light is strongest in rgb(187, 65, 123)? (a) red (b) green (c) blue
  25. 25.🌈 In #0000e9 the blue part is the hex number e9. What is it as a normal number?
  26. 26.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) black (c) red (d) bright green
  28. 28.🌈 Which hex code is cyan? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #ff0000
  29. 29.🌈 Which colour of light is strongest in rgb(37, 231, 22)? (a) blue (b) green (c) red
  30. 30.🌈 Which colour of light is strongest in rgb(38, 20, 192)? (a) green (b) blue (c) red
  31. 31.🌈 In #00e000 the green part is the hex number e0. What is it as a normal number?
  32. 32.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) blue (d) white
  33. 33.🌈 Which colour of light is strongest in rgb(79, 246, 114)? (a) blue (b) green (c) red
  34. 34.🌈 In #e00000 the red part is the hex number e0. What is it as a normal number?
  35. 35.🌈 Which colour is #000000? (a) white (b) red (c) black (d) cyan
  36. 36.🌈 Which colour of light is strongest in rgb(40, 254, 5)? (a) green (b) blue (c) red
  37. 37.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
  38. 38.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffff00
  39. 39.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(40, 239, 64)? (a) green (b) blue (c) red

Answer key

  1. 255
  2. red
  3. red
  4. blue
  5. green
  6. white
  7. red
  8. blue
  9. 74
  10. #000000
  11. cyan
  12. bright green
  13. magenta
  14. cyan
  15. blue
  16. 3
  17. 152
  18. F
  19. green
  20. yellow
  21. 156
  22. green
  23. 190
  24. red
  25. 233
  26. 127
  27. bright green
  28. #00ffff
  29. green
  30. blue
  31. 224
  32. yellow
  33. green
  34. 224
  35. black
  36. green
  37. 132
  38. #00ff00
  39. 130
  40. green

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