CSS Worksheet: Hex and RGB Colours
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.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
- 2.🌈 Which hex code is red? (a) #ffffff (b) #000000 (c) #0000ff (d) #ff0000
- 3.🌈 Which colour of light is strongest in rgb(238, 136, 10)? (a) red (b) green (c) blue
- 4.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) red (d) white
- 5.🌈 Which colour is #000000? (a) red (b) yellow (c) bright green (d) black
- 6.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #ffffff
- 7.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 8.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) magenta (d) red
- 9.🌈 Which colour of light is strongest in rgb(173, 5, 78)? (a) green (b) blue (c) red
- 10.🌈 Which colour of light is strongest in rgb(59, 178, 30)? (a) green (b) red (c) blue
- 11.🌈 Which colour is #ffff00? (a) black (b) yellow (c) magenta (d) cyan
- 12.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #0000ff
- 13.🌈 Which colour is #0000ff? (a) black (b) red (c) white (d) blue
- 14.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) cyan (d) white
- 15.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 16.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) red (d) black
- 17.🌈 Which colour of light is strongest in rgb(173, 82, 132)? (a) blue (b) green (c) red
- 18.🌈 Which colour of light is strongest in rgb(163, 18, 25)? (a) blue (b) red (c) green
- 19.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) cyan (d) red
- 20.🌈 In #000094 the blue part is the hex number 94. What is it as a normal number?
- 21.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #ffff00
- 22.🌈 In #740000 the red part is the hex number 74. What is it as a normal number?
- 23.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #ffff00 (d) #00ff00
- 24.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(188, 30, 10)? (a) blue (b) red (c) green
- 26.🌈 In #001300 the green part is the hex number 13. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(180, 52, 111)? (a) blue (b) red (c) green
- 28.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) magenta (d) bright green
- 29.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
- 30.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) magenta (c) white (d) cyan
- 31.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 32.🌈 In #e50000 the red part is the hex number e5. What is it as a normal number?
- 33.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) white (d) bright green
- 34.🌈 In #2b0000 the red part is the hex number 2b. What is it as a normal number?
- 35.🌈 In #000054 the blue part is the hex number 54. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(137, 6, 171)? (a) blue (b) red (c) green
- 37.🌈 In #008900 the green part is the hex number 89. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(178, 31, 3)? (a) blue (b) green (c) red
- 39.🌈 Which colour is #ff0000? (a) magenta (b) white (c) cyan (d) red
- 40.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffff00 (c) #00ffff (d) #ff0000
Answer key
- blue
- #ff0000
- red
- magenta
- black
- #00ff00
- 255
- blue
- red
- green
- yellow
- #0000ff
- blue
- bright green
- 241
- black
- red
- red
- white
- 148
- #ffffff
- 116
- #000000
- 82
- red
- 19
- red
- yellow
- 9
- cyan
- red
- 229
- bright green
- 43
- 84
- blue
- 137
- red
- red
- #ff00ff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids