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 hex code is yellow? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ff0000
- 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #00ff00 (d) #ffff00
- 3.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) red
- 4.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ffff (c) #0000ff (d) #ff00ff
- 5.🌈 Which colour of light is strongest in rgb(248, 47, 33)? (a) green (b) blue (c) red
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 7.🌈 Which hex code is white? (a) #0000ff (b) #ff0000 (c) #00ffff (d) #ffffff
- 8.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) black (c) bright green (d) red
- 9.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 10.🌈 Which colour is #ff0000? (a) bright green (b) red (c) blue (d) cyan
- 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
- 12.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) white (c) black (d) cyan
- 13.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
- 14.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) yellow (d) black
- 15.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
- 16.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
- 17.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) bright green (d) white
- 18.🌈 Which colour of light is strongest in rgb(54, 186, 45)? (a) red (b) green (c) blue
- 19.🌈 Which colour is #000000? (a) cyan (b) black (c) blue (d) white
- 20.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #000000
- 21.🌈 Which colour of light is strongest in rgb(118, 188, 15)? (a) blue (b) red (c) green
- 22.🌈 Which colour is #ff00ff? (a) yellow (b) white (c) cyan (d) magenta
- 23.🌈 Which colour of light is strongest in rgb(52, 159, 102)? (a) green (b) blue (c) red
- 24.🌈 Which colour of light is strongest in rgb(104, 85, 156)? (a) green (b) red (c) blue
- 25.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(208, 108, 131)? (a) red (b) green (c) blue
- 27.🌈 Which colour of light is strongest in rgb(8, 224, 134)? (a) green (b) red (c) blue
- 28.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) black (d) magenta
- 29.🌈 Which colour is #ffffff? (a) blue (b) red (c) cyan (d) white
- 30.🌈 Which colour is #00ffff? (a) black (b) red (c) cyan (d) blue
- 31.🌈 Which colour of light is strongest in rgb(97, 62, 193)? (a) green (b) red (c) blue
- 32.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
- 33.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) blue (c) red (d) cyan
- 34.🌈 In #530000 the red part is the hex number 53. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(202, 116, 131)? (a) red (b) blue (c) green
- 36.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) black (c) cyan (d) red
- 37.🌈 In #960000 the red part is the hex number 96. What is it as a normal number?
- 38.🌈 In #008700 the green part is the hex number 87. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(16, 180, 30)? (a) red (b) green (c) blue
- 40.🌈 In #000097 the blue part is the hex number 97. What is it as a normal number?
Answer key
- #ffff00
- #ff00ff
- bright green
- #00ffff
- red
- 3
- #ffffff
- yellow
- red
- red
- F
- bright green
- 30
- red
- 169
- 255
- white
- green
- black
- #0000ff
- green
- magenta
- green
- blue
- 6
- red
- green
- blue
- white
- cyan
- blue
- blue
- blue
- 83
- red
- cyan
- 150
- 135
- green
- 151
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids