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(255, 255, 0)? (a) black (b) bright green (c) yellow (d) magenta
- 2.🌈 In #002800 the green part is the hex number 28. What is it as a normal number?
- 3.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 5.🌈 Which colour is #00ffff? (a) bright green (b) blue (c) magenta (d) cyan
- 6.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) black (d) cyan
- 7.🌈 Which colour of light is strongest in rgb(172, 64, 140)? (a) green (b) red (c) blue
- 8.🌈 Which hex code is black? (a) #ffffff (b) #00ff00 (c) #000000 (d) #ff00ff
- 9.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) yellow (c) cyan (d) white
- 10.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) bright green (c) magenta (d) black
- 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 12.🌈 Which colour is #00ff00? (a) cyan (b) red (c) bright green (d) white
- 13.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #000000 (d) #ff00ff
- 14.🌈 Which colour of light is strongest in rgb(19, 215, 3)? (a) blue (b) red (c) green
- 15.🌈 In #000500 the green part is the hex number 05. What is it as a normal number?
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 17.🌈 Which colour is #ff0000? (a) blue (b) white (c) yellow (d) red
- 18.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(129, 220, 124)? (a) red (b) blue (c) green
- 20.🌈 Which colour of light is strongest in rgb(18, 175, 88)? (a) red (b) green (c) blue
- 21.🌈 Which colour is #ffffff? (a) blue (b) cyan (c) white (d) red
- 22.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #ffffff (d) #000000
- 23.🌈 Which colour of light is strongest in rgb(93, 223, 98)? (a) blue (b) green (c) red
- 24.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ffff (c) #0000ff (d) #ffffff
- 25.🌈 In #005700 the green part is the hex number 57. What is it as a normal number?
- 26.🌈 Which hex code is red? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #ff0000
- 27.🌈 Which colour of light is strongest in rgb(75, 61, 172)? (a) green (b) red (c) blue
- 28.🌈 Which colour of light is strongest in rgb(71, 70, 150)? (a) green (b) red (c) blue
- 29.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(136, 15, 167)? (a) red (b) green (c) blue
- 31.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(33, 163, 78)? (a) green (b) red (c) blue
- 33.🌈 Which colour of light is strongest in rgb(155, 3, 114)? (a) green (b) red (c) blue
- 34.🌈 Which colour of light is strongest in rgb(185, 35, 88)? (a) green (b) red (c) blue
- 35.🌈 In #000022 the blue part is the hex number 22. What is it as a normal number?
- 36.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 37.🌈 Which colour of light is strongest in rgb(221, 11, 93)? (a) blue (b) green (c) red
- 38.🌈 Which colour is #000000? (a) bright green (b) black (c) cyan (d) magenta
- 39.🌈 Which colour of light is strongest in rgb(205, 72, 107)? (a) blue (b) red (c) green
- 40.🌈 Which colour of light is strongest in rgb(251, 104, 35)? (a) red (b) blue (c) green
Answer key
- yellow
- 40
- 255
- red
- cyan
- red
- red
- #000000
- white
- magenta
- F
- bright green
- #ffffff
- green
- 5
- blue
- red
- 75
- green
- green
- white
- #00ffff
- green
- #ffff00
- 87
- #ff0000
- blue
- blue
- 211
- blue
- 27
- green
- red
- red
- 34
- 3
- red
- black
- red
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids