← Colours: hex and rgb lesson New set →

CSS Worksheet: Hex and RGB Colours

HTML and CSS lesson 15: Colours: hex and rgb · Set 273 · 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 #0000ff? (a) magenta (b) black (c) blue (d) red
  2. 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
  4. 4.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) white (c) bright green (d) yellow
  5. 5.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
  7. 7.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) white (d) red
  8. 8.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) cyan (d) magenta
  9. 9.🌈 Which colour is #ffff00? (a) magenta (b) bright green (c) yellow (d) red
  10. 10.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) red (c) cyan (d) blue
  11. 11.🌈 Which hex code is yellow? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ffff00
  12. 12.🌈 Which colour of light is strongest in rgb(2, 127, 196)? (a) red (b) blue (c) green
  13. 13.🌈 Which hex code is black? (a) #ffffff (b) #00ffff (c) #000000 (d) #00ff00
  14. 14.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #00ffff
  15. 15.🌈 Which colour is #ff0000? (a) blue (b) black (c) cyan (d) red
  16. 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
  17. 17.🌈 In #000055 the blue part is the hex number 55. What is it as a normal number?
  18. 18.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
  19. 19.🌈 Which colour of light is strongest in rgb(216, 55, 1)? (a) green (b) blue (c) red
  20. 20.🌈 Which colour of light is strongest in rgb(38, 171, 55)? (a) green (b) red (c) blue
  21. 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
  22. 22.🌈 Which colour of light is strongest in rgb(46, 19, 172)? (a) blue (b) red (c) green
  23. 23.🌈 In #a30000 the red part is the hex number a3. What is it as a normal number?
  24. 24.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff0000 (d) #ff00ff
  25. 25.🌈 In #2d0000 the red part is the hex number 2d. What is it as a normal number?
  26. 26.🌈 In #0000ba the blue part is the hex number ba. What is it as a normal number?
  27. 27.🌈 Which colour of light is strongest in rgb(54, 243, 133)? (a) green (b) blue (c) red
  28. 28.🌈 Which colour of light is strongest in rgb(57, 7, 155)? (a) red (b) blue (c) green
  29. 29.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) cyan (d) yellow
  30. 30.🌈 In #0000ea the blue part is the hex number ea. What is it as a normal number?
  31. 31.🌈 In #cb0000 the red part is the hex number cb. What is it as a normal number?
  32. 32.🌈 Which colour of light is strongest in rgb(128, 68, 209)? (a) green (b) red (c) blue
  33. 33.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
  34. 34.🌈 Which colour of light is strongest in rgb(12, 177, 97)? (a) red (b) blue (c) green
  35. 35.🌈 Which colour of light is strongest in rgb(30, 6, 151)? (a) red (b) blue (c) green
  36. 36.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ffff00 (d) #00ffff
  37. 37.🌈 Which colour of light is strongest in rgb(8, 165, 80)? (a) blue (b) green (c) red
  38. 38.🌈 Which colour of light is strongest in rgb(35, 92, 203)? (a) green (b) red (c) blue
  39. 39.🌈 In #1b0000 the red part is the hex number 1b. What is it as a normal number?
  40. 40.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?

Answer key

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

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