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(0, 255, 0)? (a) magenta (b) blue (c) white (d) bright green
- 2.🌈 Which colour is #000000? (a) bright green (b) cyan (c) black (d) blue
- 3.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 4.🌈 In #00b600 the green part is the hex number b6. What is it as a normal number?
- 5.🌈 Which hex code is cyan? (a) #00ff00 (b) #00ffff (c) #ffffff (d) #ff00ff
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
- 7.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) bright green (d) red
- 8.🌈 In #00e200 the green part is the hex number e2. What is it as a normal number?
- 9.🌈 Which colour is #00ffff? (a) white (b) magenta (c) bright green (d) cyan
- 10.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) cyan (c) red (d) magenta
- 11.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #ff00ff
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 14.🌈 Which colour of light is strongest in rgb(137, 60, 228)? (a) green (b) red (c) blue
- 15.🌈 Which colour is #ffffff? (a) white (b) black (c) bright green (d) red
- 16.🌈 Which colour of light is strongest in rgb(174, 36, 106)? (a) green (b) red (c) blue
- 17.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #0000ff
- 18.🌈 In #000006 the blue part is the hex number 06. What is it as a normal number?
- 19.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) bright green (d) black
- 20.🌈 Which colour of light is strongest in rgb(239, 39, 22)? (a) blue (b) green (c) red
- 21.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
- 22.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) magenta
- 23.🌈 Which hex code is black? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #ffffff
- 24.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) red
- 25.🌈 Which colour of light is strongest in rgb(20, 215, 124)? (a) red (b) blue (c) green
- 26.🌈 Which colour of light is strongest in rgb(191, 95, 85)? (a) blue (b) red (c) green
- 27.🌈 Which colour of light is strongest in rgb(9, 35, 167)? (a) blue (b) red (c) green
- 28.🌈 Which colour is #ff0000? (a) bright green (b) cyan (c) black (d) red
- 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
- 30.🌈 In #000020 the blue part is the hex number 20. What is it as a normal number?
- 31.🌈 In #c30000 the red part is the hex number c3. What is it as a normal number?
- 32.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ff0000
- 33.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) blue (c) cyan (d) white
- 34.🌈 Which colour of light is strongest in rgb(130, 73, 200)? (a) blue (b) red (c) green
- 35.🌈 Which colour of light is strongest in rgb(21, 204, 39)? (a) red (b) green (c) blue
- 36.🌈 Which colour of light is strongest in rgb(38, 111, 240)? (a) red (b) blue (c) green
- 37.🌈 Which colour of light is strongest in rgb(35, 187, 27)? (a) red (b) blue (c) green
- 38.🌈 Which colour of light is strongest in rgb(247, 89, 79)? (a) green (b) blue (c) red
- 39.🌈 In #006700 the green part is the hex number 67. What is it as a normal number?
- 40.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) red (d) bright green
Answer key
- bright green
- black
- 255
- 182
- #00ffff
- blue
- yellow
- 226
- cyan
- red
- #ff0000
- red
- 3
- blue
- white
- red
- #ffff00
- 6
- cyan
- red
- 40
- yellow
- #000000
- bright green
- green
- red
- blue
- red
- F
- 32
- 195
- #00ff00
- magenta
- blue
- green
- blue
- green
- red
- 103
- magenta
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids