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 colour is #0000ff? (a) cyan (b) yellow (c) bright green (d) blue
- 2.🌈 Which colour of light is strongest in rgb(45, 196, 78)? (a) blue (b) red (c) green
- 3.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) red (d) black
- 4.🌈 In #000057 the blue part is the hex number 57. What is it as a normal number?
- 5.🌈 Which colour of light is strongest in rgb(197, 115, 113)? (a) red (b) green (c) blue
- 6.🌈 In #330000 the red part is the hex number 33. What is it as a normal number?
- 7.🌈 Which colour is #00ff00? (a) bright green (b) cyan (c) white (d) blue
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) white (c) magenta (d) black
- 11.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) cyan (c) yellow (d) blue
- 12.🌈 In #000073 the blue part is the hex number 73. What is it as a normal number?
- 13.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
- 14.🌈 Which hex code is blue? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #ffff00
- 15.🌈 Which colour is #ffffff? (a) white (b) bright green (c) yellow (d) cyan
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 18.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) cyan (d) black
- 19.🌈 Which colour of light is strongest in rgb(104, 89, 178)? (a) blue (b) red (c) green
- 20.🌈 Which colour of light is strongest in rgb(107, 8, 180)? (a) red (b) blue (c) green
- 21.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ffffff (d) #ffff00
- 22.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) magenta (c) black (d) bright green
- 23.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #ff00ff
- 24.🌈 Which colour is #00ffff? (a) yellow (b) white (c) cyan (d) magenta
- 25.🌈 Which hex code is bright green? (a) #ff0000 (b) #ffff00 (c) #000000 (d) #00ff00
- 26.🌈 Which colour is #ff0000? (a) bright green (b) magenta (c) cyan (d) red
- 27.🌈 Which colour of light is strongest in rgb(94, 183, 140)? (a) blue (b) green (c) red
- 28.🌈 In #00007c the blue part is the hex number 7c. What is it as a normal number?
- 29.🌈 Which colour is #000000? (a) yellow (b) white (c) black (d) cyan
- 30.🌈 In #0000c4 the blue part is the hex number c4. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(166, 19, 9)? (a) green (b) red (c) blue
- 32.🌈 Which colour of light is strongest in rgb(172, 3, 8)? (a) green (b) blue (c) red
- 33.🌈 Which hex code is red? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ff00ff
- 34.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 35.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) cyan (c) white (d) magenta
- 36.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) bright green (d) blue
- 38.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
- 39.🌈 In #00006f the blue part is the hex number 6f. What is it as a normal number?
- 40.🌈 In #000099 the blue part is the hex number 99. What is it as a normal number?
Answer key
- blue
- green
- yellow
- 87
- red
- 51
- bright green
- red
- 3
- white
- blue
- 115
- 241
- #0000ff
- white
- blue
- F
- black
- blue
- blue
- #000000
- bright green
- #ffff00
- cyan
- #00ff00
- red
- green
- 124
- black
- 196
- red
- red
- #ff0000
- 255
- magenta
- 42
- red
- 254
- 111
- 153
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids