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) red (b) blue (c) cyan (d) magenta
- 2.🌈 In #00f100 the green part is the hex number f1. What is it as a normal number?
- 3.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ff0000
- 4.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) blue (c) yellow (d) magenta
- 5.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) red (d) cyan
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 7.🌈 Which hex code is white? (a) #ffff00 (b) #00ff00 (c) #ffffff (d) #ff00ff
- 8.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
- 10.🌈 Which colour of light is strongest in rgb(168, 123, 108)? (a) blue (b) red (c) green
- 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 12.🌈 Which colour of light is strongest in rgb(224, 87, 68)? (a) blue (b) green (c) red
- 13.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #00ffff
- 14.🌈 In #950000 the red part is the hex number 95. What is it as a normal number?
- 15.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) yellow (c) cyan (d) blue
- 16.🌈 Which colour is #000000? (a) blue (b) magenta (c) black (d) cyan
- 17.🌈 Which colour is #00ff00? (a) bright green (b) white (c) magenta (d) blue
- 18.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) magenta (d) bright green
- 19.🌈 Which colour is #ffff00? (a) red (b) magenta (c) black (d) yellow
- 20.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
- 21.🌈 In #00e100 the green part is the hex number e1. What is it as a normal number?
- 22.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 23.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) magenta (d) blue
- 24.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) white (c) red (d) bright green
- 25.🌈 Which colour of light is strongest in rgb(124, 121, 186)? (a) green (b) red (c) blue
- 26.🌈 Which colour of light is strongest in rgb(128, 241, 77)? (a) blue (b) green (c) red
- 27.🌈 Which colour is #00ffff? (a) red (b) cyan (c) yellow (d) blue
- 28.🌈 Which colour of light is strongest in rgb(35, 26, 227)? (a) green (b) red (c) blue
- 29.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff0000
- 30.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #00ff00 (d) #00ffff
- 31.🌈 In #440000 the red part is the hex number 44. What is it as a normal number?
- 32.🌈 Which hex code is blue? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #00ffff
- 33.🌈 Which colour of light is strongest in rgb(59, 225, 6)? (a) green (b) blue (c) red
- 34.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(197, 52, 39)? (a) red (b) blue (c) green
- 36.🌈 In #7d0000 the red part is the hex number 7d. What is it as a normal number?
- 37.🌈 In #009b00 the green part is the hex number 9b. What is it as a normal number?
- 38.🌈 Which colour is #0000ff? (a) blue (b) yellow (c) white (d) black
- 39.🌈 Which colour is #ffffff? (a) blue (b) cyan (c) magenta (d) white
- 40.🌈 Which colour of light is strongest in rgb(186, 85, 21)? (a) green (b) blue (c) red
Answer key
- red
- 241
- #00ff00
- magenta
- white
- blue
- #ffffff
- 242
- 3
- red
- F
- red
- #000000
- 149
- cyan
- black
- bright green
- bright green
- yellow
- 255
- 225
- red
- blue
- red
- blue
- green
- cyan
- blue
- #ff0000
- #00ffff
- 68
- #0000ff
- green
- 132
- red
- 125
- 155
- blue
- white
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids