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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 2 (d) 4
- 2.🌈 In #cf0000 the red part is the hex number cf. What is it as a normal number?
- 3.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) blue (d) yellow
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 5.🌈 Which hex code is blue? (a) #ffffff (b) #00ff00 (c) #0000ff (d) #000000
- 6.🌈 In #000300 the green part is the hex number 03. What is it as a normal number?
- 7.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #00ffff (d) #ffffff
- 8.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) bright green
- 9.🌈 Which colour is #ff00ff? (a) black (b) cyan (c) magenta (d) yellow
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 11.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 13.🌈 Which colour of light is strongest in rgb(137, 131, 187)? (a) blue (b) red (c) green
- 14.🌈 Which colour is #00ffff? (a) yellow (b) magenta (c) white (d) cyan
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 16.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ffff (d) #00ff00
- 17.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) black (c) bright green (d) magenta
- 18.🌈 Which hex code is magenta? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
- 19.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) black (d) magenta
- 20.🌈 In #00000f the blue part is the hex number 0f. What is it as a normal number?
- 21.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) red (d) black
- 22.🌈 Which colour of light is strongest in rgb(67, 8, 179)? (a) red (b) blue (c) green
- 23.🌈 Which colour of light is strongest in rgb(140, 203, 19)? (a) blue (b) red (c) green
- 24.🌈 Which colour of light is strongest in rgb(34, 29, 150)? (a) blue (b) green (c) red
- 25.🌈 Which colour of light is strongest in rgb(37, 5, 166)? (a) blue (b) red (c) green
- 26.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #0000ff
- 27.🌈 In #00cc00 the green part is the hex number cc. What is it as a normal number?
- 28.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) cyan (d) red
- 29.🌈 Which colour is #ff0000? (a) blue (b) red (c) black (d) cyan
- 30.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
- 31.🌈 Which hex code is cyan? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #00ffff
- 32.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) black (d) magenta
- 33.🌈 In #6f0000 the red part is the hex number 6f. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(252, 25, 113)? (a) blue (b) red (c) green
- 35.🌈 Which hex code is red? (a) #00ff00 (b) #00ffff (c) #ff0000 (d) #ffffff
- 36.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) white (c) blue (d) bright green
- 37.🌈 Which colour of light is strongest in rgb(173, 22, 0)? (a) blue (b) red (c) green
- 38.🌈 In #3c0000 the red part is the hex number 3c. What is it as a normal number?
- 39.🌈 Which colour is #ffffff? (a) yellow (b) cyan (c) white (d) red
- 40.🌈 Which colour of light is strongest in rgb(210, 74, 20)? (a) green (b) red (c) blue
Answer key
- 3
- 207
- red
- red
- #0000ff
- 3
- #ffff00
- yellow
- magenta
- 255
- 178
- blue
- blue
- cyan
- F
- #00ff00
- magenta
- #ff00ff
- bright green
- 15
- cyan
- blue
- green
- blue
- blue
- #ffffff
- 204
- yellow
- red
- 225
- #00ffff
- white
- 111
- red
- #ff0000
- bright green
- red
- 60
- white
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids