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 #000000? (a) white (b) cyan (c) bright green (d) black
- 2.🌈 Which hex code is bright green? (a) #00ffff (b) #ff0000 (c) #00ff00 (d) #0000ff
- 3.🌈 Which colour of light is strongest in rgb(110, 7, 220)? (a) red (b) green (c) blue
- 4.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
- 5.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #00ffff (d) #ff00ff
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
- 7.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) magenta (d) white
- 8.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) white (c) cyan (d) red
- 9.🌈 Which colour of light is strongest in rgb(55, 11, 224)? (a) green (b) blue (c) red
- 10.🌈 Which colour of light is strongest in rgb(30, 150, 110)? (a) red (b) green (c) blue
- 11.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #000000 (d) #00ffff
- 12.🌈 In #003100 the green part is the hex number 31. What is it as a normal number?
- 13.🌈 In #00009a the blue part is the hex number 9a. What is it as a normal number?
- 14.🌈 Which colour is #ffff00? (a) magenta (b) black (c) white (d) yellow
- 15.🌈 In #00dd00 the green part is the hex number dd. What is it as a normal number?
- 16.🌈 Which colour of light is strongest in rgb(188, 39, 4)? (a) red (b) green (c) blue
- 17.🌈 Which colour of light is strongest in rgb(211, 14, 34)? (a) blue (b) green (c) red
- 18.🌈 Which hex code is red? (a) #ffffff (b) #ff00ff (c) #ffff00 (d) #ff0000
- 19.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
- 20.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
- 21.🌈 In #0000e3 the blue part is the hex number e3. What is it as a normal number?
- 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
- 23.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
- 24.🌈 Which colour is #ffffff? (a) red (b) blue (c) white (d) yellow
- 25.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) red (d) black
- 26.🌈 Which colour is #ff0000? (a) bright green (b) red (c) yellow (d) white
- 27.🌈 In #b20000 the red part is the hex number b2. What is it as a normal number?
- 28.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 29.🌈 Which colour of light is strongest in rgb(80, 2, 212)? (a) green (b) red (c) blue
- 30.🌈 Which colour is #ff00ff? (a) white (b) red (c) blue (d) magenta
- 31.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?
- 32.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #ff00ff (d) #00ff00
- 33.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) cyan (c) bright green (d) yellow
- 34.🌈 Which colour of light is strongest in rgb(254, 7, 132)? (a) blue (b) red (c) green
- 35.🌈 Which colour of light is strongest in rgb(196, 75, 21)? (a) red (b) green (c) blue
- 36.🌈 In #00009d the blue part is the hex number 9d. What is it as a normal number?
- 37.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) cyan (c) red (d) white
- 38.🌈 Which colour is #00ffff? (a) yellow (b) black (c) cyan (d) white
- 39.🌈 Which colour of light is strongest in rgb(117, 54, 173)? (a) green (b) blue (c) red
- 40.🌈 Which hex code is cyan? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ffff
Answer key
- black
- #00ff00
- blue
- 128
- #0000ff
- red
- blue
- red
- blue
- green
- #ffffff
- 49
- 154
- yellow
- 221
- red
- red
- #ff0000
- blue
- 255
- 227
- 3
- 37
- white
- bright green
- red
- 178
- F
- blue
- magenta
- 5
- #ffff00
- yellow
- red
- red
- 157
- black
- cyan
- blue
- #00ffff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids