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 hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ff00 (d) #000000
- 2.🌈 In #0000a7 the blue part is the hex number a7. What is it as a normal number?
- 3.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #000000
- 4.🌈 Which colour is #0000ff? (a) magenta (b) bright green (c) blue (d) yellow
- 5.🌈 Which colour is #ffffff? (a) black (b) blue (c) red (d) white
- 6.🌈 Which colour is #000000? (a) magenta (b) bright green (c) blue (d) black
- 7.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) white (c) bright green (d) blue
- 8.🌈 Which colour of light is strongest in rgb(114, 187, 127)? (a) red (b) green (c) blue
- 9.🌈 Which hex code is black? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #000000
- 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 11.🌈 Which colour is #ffff00? (a) red (b) magenta (c) yellow (d) blue
- 12.🌈 Which colour of light is strongest in rgb(62, 157, 75)? (a) green (b) red (c) blue
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
- 14.🌈 Which colour of light is strongest in rgb(93, 199, 3)? (a) blue (b) red (c) green
- 15.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) bright green (d) yellow
- 16.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) red (d) blue
- 17.🌈 Which colour of light is strongest in rgb(42, 84, 152)? (a) green (b) blue (c) red
- 18.🌈 Which hex code is red? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #ff0000
- 19.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) white (d) bright green
- 20.🌈 In #00009e the blue part is the hex number 9e. What is it as a normal number?
- 21.🌈 In #160000 the red part is the hex number 16. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(136, 90, 192)? (a) blue (b) green (c) red
- 23.🌈 In #d20000 the red part is the hex number d2. What is it as a normal number?
- 24.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
- 25.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
- 26.🌈 Which hex code is bright green? (a) #00ffff (b) #00ff00 (c) #ffffff (d) #ffff00
- 27.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
- 28.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) white (c) black (d) yellow
- 29.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) blue (d) white
- 30.🌈 In #00e100 the green part is the hex number e1. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(51, 102, 201)? (a) blue (b) red (c) green
- 32.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
- 33.🌈 In #00ba00 the green part is the hex number ba. What is it as a normal number?
- 34.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) red
- 35.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 36.🌈 In #030000 the red part is the hex number 03. What is it as a normal number?
- 37.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
- 38.🌈 In #00001f the blue part is the hex number 1f. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(66, 234, 27)? (a) green (b) blue (c) red
- 40.🌈 Which colour is #00ffff? (a) black (b) yellow (c) bright green (d) cyan
Answer key
- #ffff00
- 167
- #ffffff
- blue
- white
- black
- blue
- green
- #000000
- F
- yellow
- green
- red
- green
- magenta
- white
- blue
- #ff0000
- cyan
- 158
- 22
- blue
- 210
- 255
- blue
- #00ff00
- 130
- black
- magenta
- 225
- blue
- 37
- 186
- yellow
- 3
- 3
- 225
- 31
- green
- cyan
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids