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 #ff0000? (a) cyan (b) yellow (c) black (d) red
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
- 3.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #000000
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 5.🌈 Which colour of light is strongest in rgb(18, 1, 198)? (a) green (b) red (c) blue
- 6.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) white (d) cyan
- 7.🌈 Which hex code is black? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #000000
- 8.🌈 In #0000e3 the blue part is the hex number e3. What is it as a normal number?
- 9.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) white (c) blue (d) bright green
- 10.🌈 Which colour is #00ff00? (a) black (b) white (c) bright green (d) red
- 11.🌈 Which hex code is white? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ffff
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 13.🌈 Which colour is #00ffff? (a) magenta (b) black (c) cyan (d) bright green
- 14.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) white (d) blue
- 15.🌈 Which hex code is blue? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #0000ff
- 16.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
- 17.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #ff00ff
- 18.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) black (d) white
- 19.🌈 Which colour of light is strongest in rgb(255, 32, 46)? (a) blue (b) green (c) red
- 20.🌈 In #2f0000 the red part is the hex number 2f. What is it as a normal number?
- 21.🌈 Which colour is #ffffff? (a) black (b) white (c) blue (d) bright green
- 22.🌈 In #00d000 the green part is the hex number d0. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(162, 123, 81)? (a) red (b) green (c) blue
- 24.🌈 Which colour of light is strongest in rgb(165, 133, 20)? (a) blue (b) red (c) green
- 25.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
- 26.🌈 In #005a00 the green part is the hex number 5a. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(140, 166, 129)? (a) green (b) blue (c) red
- 28.🌈 Which colour of light is strongest in rgb(246, 60, 103)? (a) green (b) blue (c) red
- 29.🌈 Which colour of light is strongest in rgb(27, 154, 46)? (a) red (b) green (c) blue
- 30.🌈 Which colour of light is strongest in rgb(83, 28, 180)? (a) red (b) green (c) blue
- 31.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) red (d) magenta
- 32.🌈 Which colour of light is strongest in rgb(200, 133, 91)? (a) green (b) blue (c) red
- 33.🌈 Which colour of light is strongest in rgb(140, 210, 37)? (a) green (b) blue (c) red
- 34.🌈 Which colour is #000000? (a) white (b) magenta (c) bright green (d) black
- 35.🌈 Which colour is #ffff00? (a) magenta (b) yellow (c) cyan (d) white
- 36.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 37.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) magenta (c) yellow (d) cyan
- 38.🌈 Which colour of light is strongest in rgb(184, 95, 58)? (a) green (b) blue (c) red
- 39.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) white (d) black
- 40.🌈 Which colour of light is strongest in rgb(216, 27, 18)? (a) green (b) blue (c) red
Answer key
- red
- blue
- #ffff00
- 3
- blue
- cyan
- #000000
- 227
- white
- bright green
- #ffffff
- 255
- cyan
- blue
- #0000ff
- 178
- #00ffff
- yellow
- red
- 47
- white
- 208
- red
- red
- F
- 90
- green
- red
- green
- blue
- magenta
- red
- green
- black
- yellow
- red
- black
- red
- bright green
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids