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(255, 255, 255)? (a) yellow (b) blue (c) white (d) red
- 2.🌈 In #bd0000 the red part is the hex number bd. What is it as a normal number?
- 3.🌈 Which colour is #000000? (a) cyan (b) blue (c) black (d) magenta
- 4.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #ffffff (d) #000000
- 5.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 6.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) bright green (c) cyan (d) black
- 7.🌈 In #1a0000 the red part is the hex number 1a. What is it as a normal number?
- 8.🌈 Which colour of light is strongest in rgb(107, 114, 189)? (a) blue (b) green (c) red
- 9.🌈 Which colour of light is strongest in rgb(172, 15, 11)? (a) red (b) green (c) blue
- 10.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) red (c) magenta (d) bright green
- 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
- 12.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #000000
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
- 14.🌈 Which hex code is black? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ff00ff
- 15.🌈 Which colour is rgb(0, 255, 0)? (a) magenta (b) yellow (c) red (d) bright green
- 16.🌈 Which colour of light is strongest in rgb(30, 176, 43)? (a) green (b) red (c) blue
- 17.🌈 Which colour is #ff00ff? (a) black (b) magenta (c) white (d) blue
- 18.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ff00ff
- 19.🌈 Which colour of light is strongest in rgb(9, 58, 162)? (a) blue (b) red (c) green
- 20.🌈 In #000076 the blue part is the hex number 76. What is it as a normal number?
- 21.🌈 In #a90000 the red part is the hex number a9. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(59, 179, 23)? (a) blue (b) green (c) red
- 23.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) red (c) magenta (d) white
- 24.🌈 Which colour of light is strongest in rgb(58, 47, 151)? (a) green (b) red (c) blue
- 25.🌈 Which colour is #ffff00? (a) blue (b) red (c) cyan (d) yellow
- 26.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 27.🌈 Which colour is #ff0000? (a) black (b) magenta (c) white (d) red
- 28.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ffffff (d) #ffff00
- 29.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) red (c) blue (d) black
- 30.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
- 31.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #000000
- 32.🌈 In #000004 the blue part is the hex number 04. What is it as a normal number?
- 33.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) magenta (d) bright green
- 34.🌈 Which colour is #ffffff? (a) red (b) bright green (c) white (d) yellow
- 35.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
- 36.🌈 In #00001d the blue part is the hex number 1d. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(31, 218, 132)? (a) blue (b) red (c) green
- 38.🌈 Which colour of light is strongest in rgb(206, 54, 11)? (a) red (b) blue (c) green
- 39.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) white (d) blue
- 40.🌈 Which colour of light is strongest in rgb(101, 106, 176)? (a) red (b) blue (c) green
Answer key
- white
- 189
- black
- #0000ff
- blue
- black
- 26
- blue
- red
- magenta
- F
- #ff0000
- red
- #000000
- bright green
- green
- magenta
- #00ffff
- blue
- 118
- 169
- green
- cyan
- blue
- yellow
- 3
- red
- #00ff00
- red
- 50
- #ff00ff
- 4
- blue
- white
- 255
- 29
- green
- red
- bright green
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids