← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 49 · 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 hex code is magenta? (a) #0000ff (b) #ff00ff (c) #ffffff (d) #00ffff
  2. 2.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) bright green (d) cyan
  3. 3.🌈 In #120000 the red part is the hex number 12. What is it as a normal number?
  4. 4.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #0000ff
  5. 5.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) yellow (d) magenta
  6. 6.🌈 Which hex code is blue? (a) #00ff00 (b) #ffff00 (c) #00ffff (d) #0000ff
  7. 7.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
  9. 9.🌈 Which colour of light is strongest in rgb(192, 80, 101)? (a) green (b) blue (c) red
  10. 10.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
  11. 11.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
  12. 12.🌈 Which colour of light is strongest in rgb(158, 32, 2)? (a) green (b) blue (c) red
  13. 13.🌈 Which colour of light is strongest in rgb(178, 132, 35)? (a) blue (b) red (c) green
  14. 14.🌈 Which colour of light is strongest in rgb(120, 233, 63)? (a) red (b) green (c) blue
  15. 15.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
  17. 17.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) white (d) magenta
  18. 18.🌈 Which colour of light is strongest in rgb(241, 118, 77)? (a) red (b) green (c) blue
  19. 19.🌈 Which hex code is cyan? (a) #00ffff (b) #00ff00 (c) #0000ff (d) #ffffff
  20. 20.🌈 Which colour of light is strongest in rgb(193, 66, 33)? (a) green (b) red (c) blue
  21. 21.🌈 Which colour is #ff00ff? (a) cyan (b) red (c) yellow (d) magenta
  22. 22.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  23. 23.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #ff0000
  24. 24.🌈 Which colour is #00ff00? (a) white (b) blue (c) black (d) bright green
  25. 25.🌈 Which colour of light is strongest in rgb(208, 138, 61)? (a) blue (b) green (c) red
  26. 26.🌈 Which colour of light is strongest in rgb(25, 33, 187)? (a) blue (b) green (c) red
  27. 27.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) cyan (c) magenta (d) bright green
  28. 28.🌈 Which colour of light is strongest in rgb(110, 199, 27)? (a) red (b) green (c) blue
  29. 29.🌈 In #d10000 the red part is the hex number d1. What is it as a normal number?
  30. 30.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) white (c) red (d) yellow
  31. 31.🌈 In #00005c the blue part is the hex number 5c. What is it as a normal number?
  32. 32.🌈 Which colour is #ff0000? (a) cyan (b) bright green (c) red (d) magenta
  33. 33.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(218, 94, 105)? (a) blue (b) green (c) red
  35. 35.🌈 Which colour is #000000? (a) black (b) cyan (c) blue (d) yellow
  36. 36.🌈 Which colour of light is strongest in rgb(169, 125, 13)? (a) blue (b) green (c) red
  37. 37.🌈 In #00000f the blue part is the hex number 0f. What is it as a normal number?
  38. 38.🌈 Which colour of light is strongest in rgb(71, 170, 74)? (a) green (b) red (c) blue
  39. 39.🌈 Which colour of light is strongest in rgb(248, 36, 9)? (a) red (b) green (c) blue
  40. 40.🌈 Which colour of light is strongest in rgb(188, 32, 2)? (a) green (b) red (c) blue

Answer key

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

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