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) 6 (b) 4 (c) 2 (d) 3
- 2.🌈 Which colour is #ff0000? (a) white (b) red (c) bright green (d) black
- 3.🌈 In #00003a the blue part is the hex number 3a. What is it as a normal number?
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 5.🌈 Which colour of light is strongest in rgb(78, 218, 25)? (a) green (b) red (c) blue
- 6.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) yellow (d) magenta
- 7.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) red (d) black
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 9.🌈 Which colour of light is strongest in rgb(59, 73, 176)? (a) red (b) green (c) blue
- 10.🌈 Which hex code is red? (a) #ffff00 (b) #00ffff (c) #ff00ff (d) #ff0000
- 11.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #0000ff (d) #00ffff
- 12.🌈 Which colour of light is strongest in rgb(65, 217, 4)? (a) blue (b) red (c) green
- 13.🌈 Which hex code is black? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #000000
- 14.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #ffffff
- 15.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) cyan (c) white (d) bright green
- 16.🌈 Which colour is #ffff00? (a) black (b) white (c) red (d) yellow
- 17.🌈 Which colour of light is strongest in rgb(109, 211, 42)? (a) green (b) blue (c) red
- 18.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #000000
- 19.🌈 Which colour of light is strongest in rgb(65, 151, 124)? (a) green (b) blue (c) red
- 20.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) magenta (d) black
- 21.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
- 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
- 24.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) red (d) white
- 25.🌈 Which hex code is white? (a) #ffffff (b) #00ffff (c) #000000 (d) #ff00ff
- 26.🌈 Which colour is #00ff00? (a) black (b) blue (c) bright green (d) magenta
- 27.🌈 Which colour of light is strongest in rgb(59, 84, 171)? (a) red (b) green (c) blue
- 28.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) white (d) red
- 29.🌈 In #460000 the red part is the hex number 46. What is it as a normal number?
- 30.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
- 31.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) white (d) bright green
- 32.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
- 33.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) magenta (c) yellow (d) cyan
- 34.🌈 In #000033 the blue part is the hex number 33. What is it as a normal number?
- 35.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #00ffff
- 36.🌈 In #0000c2 the blue part is the hex number c2. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(121, 8, 254)? (a) green (b) blue (c) red
- 38.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) white (d) cyan
- 39.🌈 In #7a0000 the red part is the hex number 7a. What is it as a normal number?
- 40.🌈 In #000003 the blue part is the hex number 03. What is it as a normal number?
Answer key
- 3
- red
- 58
- red
- green
- magenta
- blue
- blue
- blue
- #ff0000
- #00ffff
- green
- #000000
- #ff00ff
- white
- yellow
- green
- #0000ff
- green
- cyan
- 78
- 255
- F
- bright green
- #ffffff
- bright green
- blue
- white
- 70
- 241
- magenta
- 196
- yellow
- 51
- #ffff00
- 194
- blue
- blue
- 122
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids