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 rgb(0, 0, 255)? (a) yellow (b) white (c) cyan (d) blue
- 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
- 3.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ffffff (d) #ff00ff
- 4.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) white (d) blue
- 5.🌈 Which colour is #00ffff? (a) cyan (b) yellow (c) magenta (d) white
- 6.🌈 Which colour is #000000? (a) red (b) black (c) white (d) blue
- 7.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) black (c) cyan (d) blue
- 8.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
- 10.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) bright green (d) yellow
- 11.🌈 Which hex code is white? (a) #ffff00 (b) #ff0000 (c) #ffffff (d) #ff00ff
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
- 13.🌈 Which colour is #ff00ff? (a) cyan (b) white (c) magenta (d) blue
- 14.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ffffff (d) #000000
- 15.🌈 In #001500 the green part is the hex number 15. What is it as a normal number?
- 16.🌈 Which colour of light is strongest in rgb(125, 223, 7)? (a) green (b) blue (c) red
- 17.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 18.🌈 Which colour of light is strongest in rgb(59, 13, 226)? (a) green (b) red (c) blue
- 19.🌈 Which colour of light is strongest in rgb(157, 73, 98)? (a) green (b) blue (c) red
- 20.🌈 Which colour is #ff0000? (a) cyan (b) blue (c) red (d) black
- 21.🌈 Which colour of light is strongest in rgb(35, 36, 198)? (a) red (b) green (c) blue
- 22.🌈 In #00d100 the green part is the hex number d1. What is it as a normal number?
- 23.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) cyan (d) yellow
- 24.🌈 Which colour is #ffffff? (a) bright green (b) blue (c) magenta (d) white
- 25.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) cyan (d) blue
- 26.🌈 Which colour is #00ff00? (a) white (b) red (c) bright green (d) blue
- 27.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #00ffff
- 28.🌈 In #001f00 the green part is the hex number 1f. What is it as a normal number?
- 29.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?
- 30.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) bright green (c) blue (d) yellow
- 31.🌈 Which colour of light is strongest in rgb(217, 115, 20)? (a) green (b) red (c) blue
- 32.🌈 Which colour is #ffff00? (a) black (b) red (c) yellow (d) magenta
- 33.🌈 In #0000b9 the blue part is the hex number b9. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(9, 226, 70)? (a) green (b) blue (c) red
- 35.🌈 Which colour of light is strongest in rgb(245, 1, 7)? (a) blue (b) green (c) red
- 36.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
- 37.🌈 In #00004f the blue part is the hex number 4f. What is it as a normal number?
- 38.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ffff
- 39.🌈 In #f00000 the red part is the hex number f0. What is it as a normal number?
- 40.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
Answer key
- blue
- 3
- #ff00ff
- magenta
- cyan
- black
- black
- 255
- F
- red
- #ffffff
- red
- magenta
- #ff0000
- 21
- green
- blue
- blue
- red
- red
- blue
- 209
- bright green
- white
- cyan
- bright green
- #00ffff
- 31
- 9
- yellow
- red
- yellow
- 185
- green
- red
- 178
- 79
- #ffff00
- 240
- 155
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids