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 #ffffff? (a) white (b) black (c) cyan (d) red
- 2.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #00ff00 (d) #ffff00
- 3.🌈 Which colour is #ff0000? (a) bright green (b) blue (c) red (d) black
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
- 5.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
- 6.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
- 7.🌈 In #a50000 the red part is the hex number a5. What is it as a normal number?
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
- 9.🌈 Which colour of light is strongest in rgb(21, 13, 178)? (a) red (b) green (c) blue
- 10.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) bright green (d) black
- 11.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) bright green (c) blue (d) red
- 12.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
- 13.🌈 Which hex code is black? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #000000
- 14.🌈 Which colour is #0000ff? (a) cyan (b) black (c) blue (d) red
- 15.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) bright green (d) black
- 16.🌈 In #ee0000 the red part is the hex number ee. What is it as a normal number?
- 17.🌈 Which colour of light is strongest in rgb(61, 70, 198)? (a) red (b) green (c) blue
- 18.🌈 In #360000 the red part is the hex number 36. What is it as a normal number?
- 19.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 20.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) white (c) bright green (d) magenta
- 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
- 22.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(169, 135, 113)? (a) green (b) blue (c) red
- 24.🌈 Which colour of light is strongest in rgb(247, 96, 118)? (a) blue (b) green (c) red
- 25.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) cyan (c) blue (d) magenta
- 26.🌈 Which hex code is white? (a) #000000 (b) #0000ff (c) #ff0000 (d) #ffffff
- 27.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
- 28.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #00ffff (d) #00ff00
- 29.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) bright green (d) cyan
- 30.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) bright green (d) yellow
- 31.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(244, 71, 38)? (a) blue (b) green (c) red
- 33.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
- 34.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) cyan (c) bright green (d) red
- 35.🌈 Which colour of light is strongest in rgb(123, 48, 173)? (a) blue (b) green (c) red
- 36.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) white (d) bright green
- 37.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(99, 180, 104)? (a) blue (b) green (c) red
- 39.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #00ff00
- 40.🌈 Which colour of light is strongest in rgb(154, 67, 75)? (a) blue (b) green (c) red
Answer key
- white
- #ff0000
- red
- red
- 210
- 163
- 165
- blue
- blue
- bright green
- red
- 92
- #000000
- blue
- cyan
- 238
- blue
- 54
- 255
- magenta
- F
- 155
- red
- red
- blue
- #ffffff
- 248
- #ff00ff
- black
- magenta
- 241
- red
- 12
- cyan
- blue
- white
- 40
- green
- #ffff00
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids