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 #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
- 2.🌈 In #006400 the green part is the hex number 64. What is it as a normal number?
- 3.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) black (d) yellow
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 5.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) blue (d) bright green
- 6.🌈 Which colour of light is strongest in rgb(66, 203, 109)? (a) blue (b) green (c) red
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 8.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) blue (c) red (d) yellow
- 9.🌈 Which colour is #ff00ff? (a) yellow (b) magenta (c) black (d) bright green
- 10.🌈 Which hex code is yellow? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #ffff00
- 11.🌈 Which colour is #ffff00? (a) red (b) bright green (c) white (d) yellow
- 12.🌈 Which colour of light is strongest in rgb(197, 108, 15)? (a) green (b) blue (c) red
- 13.🌈 Which hex code is blue? (a) #000000 (b) #ff00ff (c) #0000ff (d) #ffff00
- 14.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #0000ff
- 15.🌈 Which hex code is white? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #ff0000
- 16.🌈 Which colour is #ff0000? (a) yellow (b) bright green (c) black (d) red
- 17.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
- 18.🌈 Which hex code is bright green? (a) #ffffff (b) #00ffff (c) #000000 (d) #00ff00
- 19.🌈 Which colour of light is strongest in rgb(250, 68, 138)? (a) green (b) blue (c) red
- 20.🌈 In #730000 the red part is the hex number 73. What is it as a normal number?
- 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
- 22.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) bright green (c) blue (d) cyan
- 23.🌈 Which colour of light is strongest in rgb(196, 24, 55)? (a) blue (b) green (c) red
- 24.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) red (d) bright green
- 26.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) red (d) black
- 27.🌈 Which colour of light is strongest in rgb(13, 181, 82)? (a) red (b) blue (c) green
- 28.🌈 In #880000 the red part is the hex number 88. What is it as a normal number?
- 29.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 30.🌈 Which colour is #00ffff? (a) blue (b) yellow (c) cyan (d) bright green
- 31.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(185, 87, 56)? (a) red (b) blue (c) green
- 33.🌈 Which colour of light is strongest in rgb(167, 34, 108)? (a) green (b) blue (c) red
- 34.🌈 In #000045 the blue part is the hex number 45. What is it as a normal number?
- 35.🌈 Which hex code is black? (a) #0000ff (b) #ff0000 (c) #ff00ff (d) #000000
- 36.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(167, 45, 88)? (a) green (b) blue (c) red
- 38.🌈 Which colour of light is strongest in rgb(123, 253, 139)? (a) blue (b) green (c) red
- 39.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
- 40.🌈 In #00c100 the green part is the hex number c1. What is it as a normal number?
Answer key
- red
- 100
- red
- blue
- bright green
- green
- 3
- yellow
- magenta
- #ffff00
- yellow
- red
- #0000ff
- #ff00ff
- #ffffff
- red
- 39
- #00ff00
- red
- 115
- F
- cyan
- red
- 162
- blue
- bright green
- green
- 136
- 255
- cyan
- 8
- red
- red
- 69
- #000000
- 196
- red
- green
- 196
- 193
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids