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 rgb(0, 0, 255)? (a) magenta (b) yellow (c) blue (d) white
- 2.🌈 Which colour of light is strongest in rgb(64, 167, 27)? (a) blue (b) red (c) green
- 3.🌈 Which hex code is white? (a) #ffffff (b) #ff00ff (c) #000000 (d) #0000ff
- 4.🌈 Which colour is #ff0000? (a) white (b) magenta (c) blue (d) red
- 5.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ffff (d) #ff00ff
- 6.🌈 Which colour of light is strongest in rgb(244, 135, 27)? (a) blue (b) red (c) green
- 7.🌈 In #00da00 the green part is the hex number da. What is it as a normal number?
- 8.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) magenta (d) red
- 9.🌈 In #003800 the green part is the hex number 38. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(36, 233, 68)? (a) green (b) red (c) blue
- 11.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #ff00ff (d) #00ff00
- 12.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) magenta (c) red (d) cyan
- 13.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #ff00ff
- 14.🌈 Which colour of light is strongest in rgb(65, 3, 185)? (a) blue (b) red (c) green
- 15.🌈 Which colour of light is strongest in rgb(220, 61, 74)? (a) green (b) blue (c) red
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 17.🌈 Which hex code is blue? (a) #0000ff (b) #ffff00 (c) #000000 (d) #00ff00
- 18.🌈 In #00ac00 the green part is the hex number ac. What is it as a normal number?
- 19.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 20.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) bright green (c) black (d) red
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 22.🌈 Which colour is #0000ff? (a) yellow (b) red (c) bright green (d) blue
- 23.🌈 Which colour is #ffffff? (a) magenta (b) white (c) black (d) red
- 24.🌈 Which colour of light is strongest in rgb(160, 5, 125)? (a) blue (b) red (c) green
- 25.🌈 Which hex code is black? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ffffff
- 26.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 27.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) cyan (d) bright green
- 28.🌈 Which colour of light is strongest in rgb(212, 53, 78)? (a) green (b) blue (c) red
- 29.🌈 In #580000 the red part is the hex number 58. What is it as a normal number?
- 30.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) black (c) bright green (d) cyan
- 31.🌈 In #d20000 the red part is the hex number d2. What is it as a normal number?
- 32.🌈 Which colour is #ff00ff? (a) blue (b) white (c) red (d) magenta
- 33.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
- 34.🌈 Which colour is #00ff00? (a) blue (b) magenta (c) bright green (d) yellow
- 35.🌈 Which colour of light is strongest in rgb(115, 151, 8)? (a) blue (b) red (c) green
- 36.🌈 In #0000a3 the blue part is the hex number a3. What is it as a normal number?
- 37.🌈 Which hex code is bright green? (a) #000000 (b) #ff0000 (c) #00ff00 (d) #0000ff
- 38.🌈 Which colour of light is strongest in rgb(163, 126, 131)? (a) green (b) blue (c) red
- 39.🌈 In #0000d4 the blue part is the hex number d4. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(188, 109, 87)? (a) blue (b) green (c) red
Answer key
- blue
- green
- #ffffff
- red
- #00ffff
- red
- 218
- magenta
- 56
- green
- #ffff00
- yellow
- #ff00ff
- blue
- red
- blue
- #0000ff
- 172
- red
- red
- 3
- blue
- white
- red
- #000000
- 255
- bright green
- red
- 88
- cyan
- 210
- magenta
- 106
- bright green
- green
- 163
- #00ff00
- red
- 212
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids