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 #000e00 the green part is the hex number 0e. What is it as a normal number?
- 2.🌈 Which colour is #00ff00? (a) black (b) magenta (c) bright green (d) red
- 3.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
- 4.🌈 Which hex code is red? (a) #00ff00 (b) #0000ff (c) #ff0000 (d) #00ffff
- 5.🌈 Which colour of light is strongest in rgb(40, 118, 163)? (a) green (b) blue (c) red
- 6.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) bright green (d) black
- 7.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 8.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
- 9.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #00ffff
- 10.🌈 Which colour of light is strongest in rgb(177, 20, 65)? (a) blue (b) green (c) red
- 11.🌈 Which colour of light is strongest in rgb(50, 222, 41)? (a) red (b) green (c) blue
- 12.🌈 Which colour of light is strongest in rgb(34, 199, 31)? (a) red (b) blue (c) green
- 13.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) magenta (d) blue
- 14.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
- 15.🌈 Which colour of light is strongest in rgb(11, 93, 167)? (a) red (b) green (c) blue
- 16.🌈 Which colour of light is strongest in rgb(152, 111, 29)? (a) blue (b) green (c) red
- 17.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(8, 214, 108)? (a) blue (b) green (c) red
- 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 20.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 21.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(194, 86, 87)? (a) green (b) red (c) blue
- 23.🌈 Which colour is #0000ff? (a) red (b) magenta (c) blue (d) bright green
- 24.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) blue (d) cyan
- 25.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
- 26.🌈 Which hex code is magenta? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #ff00ff
- 27.🌈 Which colour of light is strongest in rgb(171, 130, 25)? (a) green (b) red (c) blue
- 28.🌈 Which colour of light is strongest in rgb(166, 105, 3)? (a) green (b) blue (c) red
- 29.🌈 Which colour of light is strongest in rgb(191, 91, 117)? (a) green (b) blue (c) red
- 30.🌈 Which colour of light is strongest in rgb(113, 64, 161)? (a) red (b) blue (c) green
- 31.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #ff00ff (d) #0000ff
- 32.🌈 Which colour is #00ffff? (a) magenta (b) bright green (c) cyan (d) red
- 33.🌈 In #000700 the green part is the hex number 07. What is it as a normal number?
- 34.🌈 Which colour is #ff0000? (a) cyan (b) black (c) red (d) white
- 35.🌈 Which colour is #ffffff? (a) red (b) magenta (c) blue (d) white
- 36.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) yellow (d) black
- 37.🌈 Which colour of light is strongest in rgb(77, 177, 127)? (a) blue (b) green (c) red
- 38.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) yellow (c) bright green (d) red
- 39.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) yellow (c) black (d) magenta
- 40.🌈 Which hex code is yellow? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ffff00
Answer key
- 14
- bright green
- 33
- #ff0000
- blue
- bright green
- blue
- 8
- #ffffff
- red
- green
- green
- magenta
- red
- blue
- red
- 242
- green
- 3
- 255
- 250
- red
- blue
- yellow
- 211
- #ff00ff
- red
- red
- red
- blue
- #0000ff
- cyan
- 7
- red
- white
- magenta
- green
- red
- black
- #ffff00
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids