← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 311 · 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 is #ff00ff? (a) white (b) cyan (c) magenta (d) blue
  2. 2.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) red (c) bright green (d) black
  3. 3.🌈 Which colour of light is strongest in rgb(78, 34, 237)? (a) red (b) blue (c) green
  4. 4.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) cyan (c) white (d) black
  5. 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
  6. 6.🌈 Which colour is #00ffff? (a) red (b) magenta (c) cyan (d) bright green
  7. 7.🌈 Which hex code is red? (a) #000000 (b) #00ff00 (c) #0000ff (d) #ff0000
  8. 8.🌈 Which colour is #00ff00? (a) black (b) cyan (c) magenta (d) bright green
  9. 9.🌈 Which colour of light is strongest in rgb(97, 21, 195)? (a) green (b) red (c) blue
  10. 10.🌈 Which colour of light is strongest in rgb(62, 224, 74)? (a) blue (b) red (c) green
  11. 11.🌈 Which hex code is magenta? (a) #0000ff (b) #ff00ff (c) #000000 (d) #00ffff
  12. 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
  13. 13.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
  14. 14.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?
  15. 15.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) bright green (d) yellow
  16. 16.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
  17. 17.🌈 Which hex code is cyan? (a) #00ffff (b) #000000 (c) #0000ff (d) #00ff00
  18. 18.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
  19. 19.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #00ff00
  20. 20.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) cyan (c) magenta (d) white
  21. 21.🌈 Which colour is #ffffff? (a) red (b) cyan (c) white (d) bright green
  22. 22.🌈 Which colour of light is strongest in rgb(7, 242, 33)? (a) blue (b) red (c) green
  23. 23.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
  24. 24.🌈 Which colour is #ff0000? (a) red (b) bright green (c) black (d) blue
  25. 25.🌈 Which hex code is white? (a) #ffff00 (b) #000000 (c) #ffffff (d) #ff0000
  26. 26.🌈 Which hex code is black? (a) #ff00ff (b) #ffffff (c) #000000 (d) #00ff00
  27. 27.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
  28. 28.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #ff0000 (d) #ff00ff
  29. 29.🌈 In #002f00 the green part is the hex number 2f. What is it as a normal number?
  30. 30.🌈 Which colour is #000000? (a) bright green (b) magenta (c) black (d) blue
  31. 31.🌈 In #003100 the green part is the hex number 31. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(241, 139, 126)? (a) green (b) blue (c) red
  33. 33.🌈 In #00af00 the green part is the hex number af. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(96, 216, 136)? (a) blue (b) green (c) red
  35. 35.🌈 Which colour of light is strongest in rgb(13, 206, 40)? (a) blue (b) green (c) red
  36. 36.🌈 Which colour of light is strongest in rgb(24, 29, 208)? (a) red (b) green (c) blue
  37. 37.🌈 In #ae0000 the red part is the hex number ae. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(188, 9, 68)? (a) red (b) blue (c) green
  39. 39.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
  40. 40.🌈 In #00009b the blue part is the hex number 9b. What is it as a normal number?

Answer key

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

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