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 hex code is magenta? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
- 2.🌈 In #660000 the red part is the hex number 66. What is it as a normal number?
- 3.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
- 4.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) red (c) cyan (d) yellow
- 5.🌈 In #001600 the green part is the hex number 16. What is it as a normal number?
- 6.🌈 Which colour is #000000? (a) black (b) blue (c) red (d) magenta
- 7.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) blue (d) black
- 8.🌈 Which hex code is white? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ffffff
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 10.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 12.🌈 In #000067 the blue part is the hex number 67. What is it as a normal number?
- 13.🌈 In #000064 the blue part is the hex number 64. What is it as a normal number?
- 14.🌈 In #000066 the blue part is the hex number 66. What is it as a normal number?
- 15.🌈 Which colour is #ff0000? (a) magenta (b) black (c) bright green (d) red
- 16.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) black (d) blue
- 17.🌈 In #000099 the blue part is the hex number 99. What is it as a normal number?
- 18.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) cyan (d) blue
- 19.🌈 Which colour of light is strongest in rgb(173, 102, 130)? (a) green (b) blue (c) red
- 20.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) magenta (c) bright green (d) yellow
- 21.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
- 22.🌈 Which colour is #ffff00? (a) cyan (b) magenta (c) yellow (d) bright green
- 23.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) bright green (d) blue
- 24.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
- 25.🌈 In #00004e the blue part is the hex number 4e. What is it as a normal number?
- 26.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
- 27.🌈 Which colour is #ffffff? (a) white (b) magenta (c) yellow (d) red
- 28.🌈 Which hex code is blue? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #0000ff
- 29.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(125, 133, 200)? (a) blue (b) green (c) red
- 31.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #00ffff
- 32.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) black (d) blue
- 33.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) magenta (d) yellow
- 34.🌈 In #00ea00 the green part is the hex number ea. What is it as a normal number?
- 35.🌈 In #e70000 the red part is the hex number e7. What is it as a normal number?
- 36.🌈 Which hex code is yellow? (a) #ff00ff (b) #0000ff (c) #ffff00 (d) #00ff00
- 37.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
- 38.🌈 In #00a000 the green part is the hex number a0. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(207, 91, 127)? (a) blue (b) green (c) red
- 40.🌈 Which hex code is bright green? (a) #000000 (b) #0000ff (c) #00ff00 (d) #ff0000
Answer key
- #ff00ff
- 102
- 255
- yellow
- 22
- black
- blue
- #ffffff
- 3
- 133
- red
- 103
- 100
- 102
- red
- blue
- 153
- white
- red
- magenta
- 18
- yellow
- red
- F
- 78
- blue
- white
- #0000ff
- 67
- blue
- #ff0000
- bright green
- cyan
- 234
- 231
- #ffff00
- 105
- 160
- red
- #00ff00
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids