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.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) bright green (d) yellow
- 2.🌈 Which colour of light is strongest in rgb(7, 246, 5)? (a) red (b) blue (c) green
- 3.🌈 Which colour is #00ff00? (a) yellow (b) black (c) bright green (d) red
- 4.🌈 Which hex code is white? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #ffffff
- 5.🌈 Which hex code is red? (a) #ffffff (b) #ff0000 (c) #0000ff (d) #00ffff
- 6.🌈 Which hex code is black? (a) #00ffff (b) #ffff00 (c) #000000 (d) #ff0000
- 7.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #ffffff
- 8.🌈 In #860000 the red part is the hex number 86. What is it as a normal number?
- 9.🌈 Which colour is #00ffff? (a) cyan (b) red (c) yellow (d) black
- 10.🌈 Which colour of light is strongest in rgb(161, 11, 120)? (a) green (b) red (c) blue
- 11.🌈 Which colour of light is strongest in rgb(37, 162, 87)? (a) red (b) blue (c) green
- 12.🌈 Which colour of light is strongest in rgb(70, 126, 188)? (a) blue (b) green (c) red
- 13.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
- 14.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 15.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) magenta (c) cyan (d) white
- 16.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) yellow (d) bright green
- 17.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
- 18.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) magenta (d) blue
- 19.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
- 20.🌈 Which hex code is blue? (a) #00ffff (b) #000000 (c) #0000ff (d) #00ff00
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 2 (d) 4
- 22.🌈 In #00ac00 the green part is the hex number ac. What is it as a normal number?
- 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
- 24.🌈 Which colour of light is strongest in rgb(1, 49, 230)? (a) green (b) red (c) blue
- 25.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) blue (d) cyan
- 26.🌈 Which colour is #0000ff? (a) black (b) yellow (c) blue (d) bright green
- 27.🌈 In #00001e the blue part is the hex number 1e. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(67, 37, 217)? (a) red (b) blue (c) green
- 29.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
- 30.🌈 Which colour is #ffff00? (a) magenta (b) black (c) yellow (d) blue
- 31.🌈 Which colour of light is strongest in rgb(81, 91, 171)? (a) green (b) red (c) blue
- 32.🌈 Which hex code is bright green? (a) #ff00ff (b) #00ffff (c) #ff0000 (d) #00ff00
- 33.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) cyan (c) bright green (d) red
- 34.🌈 In #000010 the blue part is the hex number 10. What is it as a normal number?
- 35.🌈 Which colour is #ff0000? (a) bright green (b) magenta (c) white (d) red
- 36.🌈 Which colour of light is strongest in rgb(170, 51, 22)? (a) green (b) red (c) blue
- 37.🌈 Which colour is #000000? (a) black (b) yellow (c) cyan (d) blue
- 38.🌈 Which colour of light is strongest in rgb(121, 102, 238)? (a) blue (b) red (c) green
- 39.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 40.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff00ff (c) #0000ff (d) #ff0000
Answer key
- magenta
- green
- bright green
- #ffffff
- #ff0000
- #000000
- #ff00ff
- 134
- cyan
- red
- green
- blue
- blue
- 255
- white
- cyan
- 241
- black
- 153
- #0000ff
- 3
- 172
- F
- blue
- bright green
- blue
- 30
- blue
- 69
- yellow
- blue
- #00ff00
- red
- 16
- red
- red
- black
- blue
- red
- #ffff00
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids