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 #ff00ff? (a) black (b) white (c) blue (d) magenta
- 2.🌈 Which hex code is red? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #ff0000
- 3.🌈 Which colour of light is strongest in rgb(30, 230, 131)? (a) red (b) blue (c) green
- 4.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #00ff00
- 5.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) cyan (c) magenta (d) blue
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
- 8.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
- 10.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) yellow (c) cyan (d) bright green
- 11.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) white (d) red
- 12.🌈 Which hex code is yellow? (a) #ff00ff (b) #000000 (c) #ffffff (d) #ffff00
- 13.🌈 Which colour of light is strongest in rgb(162, 32, 97)? (a) red (b) green (c) blue
- 14.🌈 Which colour of light is strongest in rgb(46, 151, 1)? (a) green (b) blue (c) red
- 15.🌈 Which colour of light is strongest in rgb(126, 40, 208)? (a) red (b) green (c) blue
- 16.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) yellow (d) red
- 17.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) black (c) red (d) white
- 18.🌈 In #0000d1 the blue part is the hex number d1. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(5, 88, 226)? (a) blue (b) green (c) red
- 20.🌈 Which hex code is black? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #00ff00
- 21.🌈 Which colour of light is strongest in rgb(179, 113, 129)? (a) green (b) red (c) blue
- 22.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
- 23.🌈 Which colour is #000000? (a) blue (b) white (c) black (d) yellow
- 24.🌈 Which colour is #ff0000? (a) bright green (b) red (c) black (d) cyan
- 25.🌈 Which colour is #00ff00? (a) red (b) black (c) blue (d) bright green
- 26.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(23, 237, 18)? (a) blue (b) red (c) green
- 28.🌈 Which colour of light is strongest in rgb(250, 4, 80)? (a) blue (b) green (c) red
- 29.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) black (d) blue
- 30.🌈 Which colour of light is strongest in rgb(0, 176, 16)? (a) blue (b) green (c) red
- 31.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff0000 (c) #ffff00 (d) #00ffff
- 32.🌈 Which colour of light is strongest in rgb(21, 170, 9)? (a) blue (b) green (c) red
- 33.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) Z (d) J
- 34.🌈 In #0000c7 the blue part is the hex number c7. What is it as a normal number?
- 35.🌈 In #c20000 the red part is the hex number c2. What is it as a normal number?
- 36.🌈 In #0000b5 the blue part is the hex number b5. What is it as a normal number?
- 37.🌈 In #000000 the red part is the hex number 00. What is it as a normal number?
- 38.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) blue (c) cyan (d) bright green
- 39.🌈 Which colour is #ffffff? (a) bright green (b) red (c) magenta (d) white
- 40.🌈 In #cd0000 the red part is the hex number cd. What is it as a normal number?
Answer key
- magenta
- #ff0000
- green
- #00ff00
- magenta
- red
- 3
- 255
- blue
- yellow
- red
- #ffff00
- red
- green
- blue
- blue
- white
- 209
- blue
- #000000
- red
- 225
- black
- red
- bright green
- 11
- green
- red
- cyan
- green
- #00ffff
- green
- F
- 199
- 194
- 181
- 0
- cyan
- white
- 205
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids