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.🌈 In #00005f the blue part is the hex number 5f. What is it as a normal number?
- 2.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #ffffff (d) #00ffff
- 3.🌈 Which colour of light is strongest in rgb(187, 61, 118)? (a) green (b) red (c) blue
- 4.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
- 5.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) cyan (c) yellow (d) red
- 6.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #00ffff (d) #000000
- 7.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
- 8.🌈 In #00003c the blue part is the hex number 3c. What is it as a normal number?
- 9.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ffffff (d) #0000ff
- 10.🌈 In #00c800 the green part is the hex number c8. What is it as a normal number?
- 11.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) magenta (c) white (d) bright green
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 13.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff0000
- 14.🌈 Which colour is #00ffff? (a) red (b) bright green (c) yellow (d) cyan
- 15.🌈 Which colour of light is strongest in rgb(86, 22, 229)? (a) red (b) green (c) blue
- 16.🌈 Which hex code is magenta? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #00ff00
- 17.🌈 Which colour of light is strongest in rgb(110, 139, 216)? (a) blue (b) green (c) red
- 18.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
- 19.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
- 20.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 21.🌈 Which colour is #000000? (a) white (b) yellow (c) bright green (d) black
- 22.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
- 23.🌈 Which hex code is yellow? (a) #000000 (b) #0000ff (c) #ff00ff (d) #ffff00
- 24.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) white (c) cyan (d) bright green
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) magenta (d) bright green
- 26.🌈 Which colour is #ffffff? (a) red (b) white (c) blue (d) bright green
- 27.🌈 Which colour of light is strongest in rgb(104, 248, 14)? (a) green (b) red (c) blue
- 28.🌈 In #000042 the blue part is the hex number 42. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(13, 70, 235)? (a) red (b) green (c) blue
- 30.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 31.🌈 Which colour is #00ff00? (a) red (b) cyan (c) bright green (d) yellow
- 32.🌈 Which hex code is red? (a) #000000 (b) #00ffff (c) #ff00ff (d) #ff0000
- 33.🌈 Which colour of light is strongest in rgb(74, 170, 41)? (a) red (b) green (c) blue
- 34.🌈 Which colour of light is strongest in rgb(43, 159, 40)? (a) green (b) blue (c) red
- 35.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) magenta (c) red (d) bright green
- 36.🌈 Which colour of light is strongest in rgb(1, 150, 26)? (a) green (b) blue (c) red
- 37.🌈 In #00ba00 the green part is the hex number ba. What is it as a normal number?
- 38.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 39.🌈 Which colour is #0000ff? (a) magenta (b) cyan (c) blue (d) red
- 40.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
Answer key
- 95
- #ffffff
- red
- 36
- yellow
- #0000ff
- 101
- 60
- #000000
- 200
- white
- F
- #00ff00
- cyan
- blue
- #ff00ff
- blue
- 161
- 196
- red
- black
- 242
- #ffff00
- cyan
- black
- white
- green
- 66
- blue
- 3
- bright green
- #ff0000
- green
- green
- bright green
- green
- 186
- 255
- blue
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids