← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 322 · 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 #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  2. 2.🌈 Which colour is #00ffff? (a) black (b) yellow (c) red (d) cyan
  3. 3.🌈 Which colour is #ffff00? (a) cyan (b) black (c) yellow (d) bright green
  4. 4.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) blue (c) bright green (d) white
  5. 5.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) white (d) yellow
  6. 6.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) bright green (d) magenta
  7. 7.🌈 Which colour of light is strongest in rgb(205, 19, 47)? (a) blue (b) green (c) red
  8. 8.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) cyan (c) magenta (d) yellow
  9. 9.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #00ff00 (d) #000000
  10. 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
  11. 11.🌈 Which colour of light is strongest in rgb(49, 169, 7)? (a) green (b) red (c) blue
  12. 12.🌈 Which colour of light is strongest in rgb(85, 54, 220)? (a) red (b) blue (c) green
  13. 13.🌈 In #140000 the red part is the hex number 14. What is it as a normal number?
  14. 14.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) red (d) white
  15. 15.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) blue (d) red
  16. 16.🌈 In #000084 the blue part is the hex number 84. What is it as a normal number?
  17. 17.🌈 Which colour is #0000ff? (a) cyan (b) red (c) blue (d) bright green
  18. 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
  19. 19.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
  20. 20.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  21. 21.🌈 Which colour of light is strongest in rgb(232, 18, 98)? (a) green (b) red (c) blue
  22. 22.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ffff (d) #00ff00
  23. 23.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) yellow (c) magenta (d) black
  24. 24.🌈 Which colour of light is strongest in rgb(64, 204, 1)? (a) blue (b) red (c) green
  25. 25.🌈 Which hex code is black? (a) #0000ff (b) #00ffff (c) #000000 (d) #00ff00
  26. 26.🌈 Which hex code is blue? (a) #ff00ff (b) #0000ff (c) #00ff00 (d) #00ffff
  27. 27.🌈 Which colour is #ffffff? (a) white (b) yellow (c) red (d) blue
  28. 28.🌈 Which colour is #ff00ff? (a) blue (b) cyan (c) black (d) magenta
  29. 29.🌈 In #00007d the blue part is the hex number 7d. What is it as a normal number?
  30. 30.🌈 Which colour of light is strongest in rgb(11, 54, 156)? (a) green (b) blue (c) red
  31. 31.🌈 Which hex code is cyan? (a) #ff0000 (b) #ff00ff (c) #ffff00 (d) #00ffff
  32. 32.🌈 Which hex code is yellow? (a) #00ff00 (b) #ff0000 (c) #ffff00 (d) #ff00ff
  33. 33.🌈 Which hex code is magenta? (a) #ffffff (b) #00ffff (c) #ff00ff (d) #ffff00
  34. 34.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) blue (d) magenta
  35. 35.🌈 Which colour of light is strongest in rgb(41, 134, 206)? (a) green (b) blue (c) red
  36. 36.🌈 In #002300 the green part is the hex number 23. What is it as a normal number?
  37. 37.🌈 Which colour of light is strongest in rgb(95, 154, 110)? (a) green (b) red (c) blue
  38. 38.🌈 In #00002d the blue part is the hex number 2d. What is it as a normal number?
  39. 39.🌈 In #940000 the red part is the hex number 94. What is it as a normal number?
  40. 40.🌈 Which colour of light is strongest in rgb(50, 27, 222)? (a) red (b) green (c) blue

Answer key

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

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