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.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
- 2.🌈 Which colour is #ffff00? (a) magenta (b) red (c) blue (d) yellow
- 3.🌈 In #005b00 the green part is the hex number 5b. What is it as a normal number?
- 4.🌈 Which colour is #00ffff? (a) black (b) magenta (c) red (d) cyan
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 6.🌈 Which colour is #0000ff? (a) blue (b) black (c) cyan (d) bright green
- 7.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) cyan (d) magenta
- 8.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) magenta (c) black (d) yellow
- 9.🌈 Which colour of light is strongest in rgb(105, 121, 157)? (a) blue (b) green (c) red
- 10.🌈 Which colour is #ffffff? (a) white (b) blue (c) red (d) black
- 11.🌈 Which colour of light is strongest in rgb(62, 138, 195)? (a) red (b) green (c) blue
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 13.🌈 Which colour of light is strongest in rgb(233, 16, 88)? (a) red (b) green (c) blue
- 14.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) white (c) red (d) black
- 15.🌈 Which colour is #ff0000? (a) red (b) cyan (c) blue (d) magenta
- 16.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #ff00ff (d) #000000
- 17.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) magenta (d) cyan
- 18.🌈 Which hex code is yellow? (a) #00ff00 (b) #ffff00 (c) #00ffff (d) #ff00ff
- 19.🌈 Which colour is #00ff00? (a) yellow (b) cyan (c) bright green (d) red
- 20.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 21.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) magenta (c) cyan (d) yellow
- 22.🌈 Which colour of light is strongest in rgb(79, 83, 170)? (a) green (b) red (c) blue
- 23.🌈 Which colour of light is strongest in rgb(124, 161, 74)? (a) blue (b) red (c) green
- 24.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) yellow (d) red
- 25.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
- 26.🌈 Which hex code is blue? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #00ffff
- 27.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
- 28.🌈 In #00009b the blue part is the hex number 9b. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(174, 92, 14)? (a) blue (b) green (c) red
- 30.🌈 In #0d0000 the red part is the hex number 0d. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(151, 138, 2)? (a) blue (b) red (c) green
- 32.🌈 Which colour of light is strongest in rgb(152, 111, 134)? (a) green (b) red (c) blue
- 33.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) yellow (d) magenta
- 34.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #ffffff
- 35.🌈 Which colour of light is strongest in rgb(45, 101, 151)? (a) red (b) green (c) blue
- 36.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) cyan (c) white (d) bright green
- 37.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #ffffff (d) #0000ff
- 38.🌈 In #2a0000 the red part is the hex number 2a. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(90, 169, 39)? (a) blue (b) green (c) red
- 40.🌈 Which colour of light is strongest in rgb(164, 79, 59)? (a) red (b) green (c) blue
Answer key
- 255
- yellow
- 91
- cyan
- 3
- blue
- blue
- yellow
- blue
- white
- blue
- blue
- red
- red
- red
- #ffffff
- white
- #ffff00
- bright green
- red
- cyan
- blue
- green
- magenta
- 17
- #0000ff
- F
- 155
- red
- 13
- red
- red
- black
- #000000
- blue
- bright green
- #00ffff
- 42
- green
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids