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 of light is strongest in rgb(105, 118, 204)? (a) green (b) blue (c) red
- 2.🌈 Which colour is #0000ff? (a) black (b) red (c) yellow (d) blue
- 3.🌈 Which hex code is red? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #ffffff
- 4.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) yellow (c) black (d) cyan
- 5.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
- 6.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) cyan (c) black (d) white
- 7.🌈 Which colour of light is strongest in rgb(34, 118, 172)? (a) red (b) blue (c) green
- 8.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
- 9.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) white (d) red
- 10.🌈 Which colour is #ffff00? (a) cyan (b) red (c) magenta (d) yellow
- 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
- 13.🌈 Which colour of light is strongest in rgb(107, 31, 180)? (a) red (b) green (c) blue
- 14.🌈 Which colour is #00ffff? (a) white (b) magenta (c) cyan (d) bright green
- 15.🌈 In #0000d1 the blue part is the hex number d1. What is it as a normal number?
- 16.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) yellow (c) magenta (d) bright green
- 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 18.🌈 Which hex code is yellow? (a) #ff0000 (b) #ff00ff (c) #ffff00 (d) #ffffff
- 19.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) bright green (c) magenta (d) red
- 20.🌈 In #000f00 the green part is the hex number 0f. What is it as a normal number?
- 21.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) magenta (c) cyan (d) bright green
- 22.🌈 Which colour is #ff0000? (a) blue (b) black (c) bright green (d) red
- 23.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) white (d) green
- 24.🌈 Which hex code is magenta? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ff0000
- 25.🌈 Which colour is #ffffff? (a) bright green (b) black (c) blue (d) white
- 26.🌈 Which colour is #000000? (a) white (b) bright green (c) yellow (d) black
- 27.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #0000ff (d) #ffff00
- 28.🌈 Which hex code is bright green? (a) #0000ff (b) #ffff00 (c) #00ff00 (d) #000000
- 29.🌈 Which colour of light is strongest in rgb(163, 138, 82)? (a) red (b) blue (c) green
- 30.🌈 Which hex code is cyan? (a) #00ff00 (b) #ff00ff (c) #00ffff (d) #ff0000
- 31.🌈 Which colour of light is strongest in rgb(203, 41, 131)? (a) green (b) red (c) blue
- 32.🌈 Which colour of light is strongest in rgb(68, 44, 159)? (a) green (b) red (c) blue
- 33.🌈 Which colour of light is strongest in rgb(251, 117, 92)? (a) green (b) red (c) blue
- 34.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(199, 23, 119)? (a) green (b) blue (c) red
- 36.🌈 Which colour of light is strongest in rgb(242, 0, 74)? (a) blue (b) red (c) green
- 37.🌈 In #460000 the red part is the hex number 46. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(218, 84, 28)? (a) green (b) red (c) blue
- 39.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) magenta (d) cyan
- 40.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
Answer key
- blue
- blue
- #ff0000
- bright green
- red
- black
- blue
- 228
- red
- yellow
- 3
- 255
- blue
- cyan
- 209
- yellow
- F
- #ffff00
- magenta
- 15
- cyan
- red
- blue
- #ff00ff
- white
- black
- #0000ff
- #00ff00
- red
- #00ffff
- red
- blue
- red
- 63
- red
- red
- 70
- red
- blue
- 131
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids