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 red? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #ff0000
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 3.🌈 Which colour is #ff0000? (a) white (b) magenta (c) red (d) black
- 4.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) magenta (d) yellow
- 5.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 6.🌈 Which colour is #000000? (a) red (b) cyan (c) blue (d) black
- 7.🌈 In #003200 the green part is the hex number 32. What is it as a normal number?
- 8.🌈 Which colour is #0000ff? (a) magenta (b) yellow (c) black (d) blue
- 9.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) white (d) yellow
- 10.🌈 Which colour of light is strongest in rgb(168, 112, 47)? (a) green (b) blue (c) red
- 11.🌈 Which hex code is black? (a) #00ffff (b) #00ff00 (c) #000000 (d) #ffff00
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 13.🌈 In #940000 the red part is the hex number 94. What is it as a normal number?
- 14.🌈 Which colour of light is strongest in rgb(76, 103, 215)? (a) red (b) blue (c) green
- 15.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) yellow (c) magenta (d) bright green
- 16.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) yellow (d) white
- 17.🌈 Which colour of light is strongest in rgb(13, 138, 163)? (a) red (b) blue (c) green
- 18.🌈 Which colour of light is strongest in rgb(71, 169, 84)? (a) green (b) red (c) blue
- 19.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ff00 (c) #00ffff (d) #ffff00
- 20.🌈 In #470000 the red part is the hex number 47. What is it as a normal number?
- 21.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #ff0000
- 22.🌈 Which colour is #00ffff? (a) blue (b) yellow (c) cyan (d) bright green
- 23.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #000000
- 24.🌈 In #00000e the blue part is the hex number 0e. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) cyan (d) magenta
- 26.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 27.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #ffffff (d) #00ff00
- 28.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) blue (d) bright green
- 29.🌈 In #0000fc the blue part is the hex number fc. What is it as a normal number?
- 30.🌈 Which colour is #00ff00? (a) magenta (b) blue (c) red (d) bright green
- 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 32.🌈 Which colour of light is strongest in rgb(116, 92, 222)? (a) red (b) green (c) blue
- 33.🌈 Which colour is #ffffff? (a) white (b) red (c) yellow (d) cyan
- 34.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) cyan (d) magenta
- 35.🌈 In #0000e4 the blue part is the hex number e4. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(48, 169, 127)? (a) blue (b) red (c) green
- 37.🌈 Which hex code is yellow? (a) #ffff00 (b) #ffffff (c) #00ff00 (d) #00ffff
- 38.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(3, 135, 177)? (a) green (b) blue (c) red
- 40.🌈 Which colour of light is strongest in rgb(98, 4, 170)? (a) green (b) red (c) blue
Answer key
- #ff0000
- red
- red
- magenta
- 255
- black
- 50
- blue
- blue
- red
- #000000
- F
- 148
- blue
- yellow
- red
- blue
- green
- #00ff00
- 71
- #0000ff
- cyan
- #00ffff
- 14
- bright green
- blue
- #ff00ff
- magenta
- 252
- bright green
- 3
- blue
- white
- yellow
- 228
- green
- #ffff00
- 153
- blue
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids