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 #0000a9 the blue part is the hex number a9. What is it as a normal number?
- 2.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) magenta (c) yellow (d) red
- 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 4.🌈 In #003c00 the green part is the hex number 3c. What is it as a normal number?
- 5.🌈 Which hex code is bright green? (a) #ffff00 (b) #ffffff (c) #ff00ff (d) #00ff00
- 6.🌈 Which colour of light is strongest in rgb(150, 66, 34)? (a) green (b) blue (c) red
- 7.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) cyan (c) blue (d) black
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 9.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #00ff00 (d) #ffff00
- 10.🌈 Which hex code is red? (a) #ffffff (b) #00ff00 (c) #ff0000 (d) #ff00ff
- 11.🌈 Which colour of light is strongest in rgb(13, 130, 234)? (a) green (b) red (c) blue
- 12.🌈 In #630000 the red part is the hex number 63. What is it as a normal number?
- 13.🌈 Which colour of light is strongest in rgb(51, 82, 175)? (a) red (b) blue (c) green
- 14.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 15.🌈 Which colour is #000000? (a) black (b) magenta (c) blue (d) cyan
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) white (c) magenta (d) bright green
- 17.🌈 Which colour of light is strongest in rgb(205, 6, 11)? (a) green (b) red (c) blue
- 18.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) red (c) white (d) black
- 19.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) cyan (d) yellow
- 20.🌈 In #005500 the green part is the hex number 55. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(34, 171, 16)? (a) blue (b) red (c) green
- 22.🌈 Which colour is #0000ff? (a) red (b) magenta (c) blue (d) black
- 23.🌈 Which colour is #00ffff? (a) cyan (b) white (c) black (d) red
- 24.🌈 Which hex code is cyan? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #0000ff
- 25.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(58, 161, 64)? (a) red (b) blue (c) green
- 27.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(58, 90, 236)? (a) red (b) green (c) blue
- 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
- 30.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
- 31.🌈 Which colour is #00ff00? (a) white (b) red (c) yellow (d) bright green
- 32.🌈 Which colour is #ffffff? (a) cyan (b) black (c) white (d) yellow
- 33.🌈 Which colour is #ff00ff? (a) red (b) cyan (c) black (d) magenta
- 34.🌈 In #00da00 the green part is the hex number da. What is it as a normal number?
- 35.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) red (c) bright green (d) cyan
- 36.🌈 Which colour of light is strongest in rgb(93, 222, 100)? (a) blue (b) red (c) green
- 37.🌈 Which colour of light is strongest in rgb(164, 20, 25)? (a) blue (b) red (c) green
- 38.🌈 In #8c0000 the red part is the hex number 8c. What is it as a normal number?
- 39.🌈 In #002c00 the green part is the hex number 2c. What is it as a normal number?
- 40.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
Answer key
- 169
- red
- 3
- 60
- #00ff00
- red
- blue
- blue
- #ffffff
- #ff0000
- blue
- 99
- blue
- red
- black
- bright green
- red
- white
- black
- 85
- green
- blue
- cyan
- #00ffff
- 241
- green
- 67
- blue
- F
- 255
- bright green
- white
- magenta
- 218
- cyan
- green
- red
- 140
- 44
- 0
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids