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) yellow (b) red (c) bright green (d) magenta
- 2.🌈 Which hex code is cyan? (a) #00ffff (b) #0000ff (c) #00ff00 (d) #ffffff
- 3.🌈 Which colour is #000000? (a) white (b) black (c) blue (d) bright green
- 4.🌈 Which colour of light is strongest in rgb(194, 35, 12)? (a) red (b) blue (c) green
- 5.🌈 In #4c0000 the red part is the hex number 4c. What is it as a normal number?
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 7.🌈 Which colour of light is strongest in rgb(40, 93, 217)? (a) blue (b) red (c) green
- 8.🌈 Which colour is #00ffff? (a) white (b) cyan (c) magenta (d) bright green
- 9.🌈 Which hex code is blue? (a) #ffff00 (b) #00ffff (c) #000000 (d) #0000ff
- 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 11.🌈 Which hex code is magenta? (a) #0000ff (b) #ff00ff (c) #ff0000 (d) #00ff00
- 12.🌈 Which hex code is black? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #0000ff
- 13.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) white (d) magenta
- 14.🌈 Which colour is #ffffff? (a) white (b) cyan (c) blue (d) red
- 15.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) yellow (d) red
- 16.🌈 Which colour of light is strongest in rgb(38, 92, 235)? (a) green (b) blue (c) red
- 17.🌈 Which colour of light is strongest in rgb(4, 165, 116)? (a) green (b) blue (c) red
- 18.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
- 19.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
- 20.🌈 In #000000 the red part is the hex number 00. What is it as a normal number?
- 21.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 22.🌈 In #00e500 the green part is the hex number e5. What is it as a normal number?
- 23.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #00ffff
- 24.🌈 Which colour of light is strongest in rgb(11, 26, 219)? (a) blue (b) red (c) green
- 25.🌈 Which colour of light is strongest in rgb(219, 38, 70)? (a) green (b) blue (c) red
- 26.🌈 In #1a0000 the red part is the hex number 1a. What is it as a normal number?
- 27.🌈 In #0000cb the blue part is the hex number cb. What is it as a normal number?
- 28.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) red (c) cyan (d) yellow
- 29.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ff00ff
- 30.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
- 31.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) blue (d) magenta
- 32.🌈 Which colour is #ff00ff? (a) black (b) cyan (c) blue (d) magenta
- 33.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) black (c) cyan (d) red
- 34.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
- 35.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) bright green (c) white (d) red
- 36.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
- 37.🌈 In #00f600 the green part is the hex number f6. What is it as a normal number?
- 38.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(74, 183, 8)? (a) red (b) green (c) blue
- 40.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) yellow (c) magenta (d) bright green
Answer key
- red
- #00ffff
- black
- red
- 76
- blue
- blue
- cyan
- #0000ff
- 3
- #ff00ff
- #000000
- black
- white
- bright green
- blue
- green
- 255
- 235
- 0
- red
- 229
- #ff0000
- blue
- red
- 26
- 203
- yellow
- #00ff00
- 64
- blue
- magenta
- red
- 55
- white
- 178
- 246
- 164
- green
- magenta
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids