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 bright green? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #ffffff
- 2.🌈 Which colour of light is strongest in rgb(111, 40, 230)? (a) green (b) red (c) blue
- 3.🌈 Which hex code is yellow? (a) #000000 (b) #0000ff (c) #ffff00 (d) #ff0000
- 4.🌈 Which colour is #ff0000? (a) blue (b) black (c) magenta (d) red
- 5.🌈 Which hex code is white? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #ff00ff
- 6.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #00ffff
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 8.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) black (d) red
- 9.🌈 Which colour of light is strongest in rgb(240, 65, 3)? (a) green (b) red (c) blue
- 10.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #ffffff (d) #00ff00
- 11.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) magenta (c) yellow (d) black
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) black (d) green
- 13.🌈 In #0000d1 the blue part is the hex number d1. What is it as a normal number?
- 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 15.🌈 Which colour is #ffff00? (a) red (b) yellow (c) bright green (d) cyan
- 16.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 17.🌈 In #009f00 the green part is the hex number 9f. What is it as a normal number?
- 18.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #ffff00 (d) #ffffff
- 19.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
- 20.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) white (d) black
- 21.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) magenta (c) red (d) blue
- 22.🌈 In #8b0000 the red part is the hex number 8b. What is it as a normal number?
- 23.🌈 Which colour is #00ffff? (a) cyan (b) red (c) black (d) magenta
- 24.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
- 25.🌈 In #0f0000 the red part is the hex number 0f. What is it as a normal number?
- 26.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) white (c) bright green (d) blue
- 27.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
- 28.🌈 Which colour is #0000ff? (a) yellow (b) white (c) blue (d) magenta
- 29.🌈 Which colour is #ffffff? (a) yellow (b) bright green (c) blue (d) white
- 30.🌈 Which colour is #000000? (a) bright green (b) cyan (c) black (d) white
- 31.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) blue (c) magenta (d) cyan
- 32.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #00ff00
- 33.🌈 Which colour of light is strongest in rgb(118, 163, 51)? (a) blue (b) red (c) green
- 34.🌈 Which colour is #00ff00? (a) black (b) red (c) magenta (d) bright green
- 35.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
- 36.🌈 Which hex code is black? (a) #ffff00 (b) #ffffff (c) #ff0000 (d) #000000
- 37.🌈 Which colour of light is strongest in rgb(215, 103, 29)? (a) red (b) blue (c) green
- 38.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
- 39.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(253, 42, 87)? (a) blue (b) red (c) green
Answer key
- #00ff00
- blue
- #ffff00
- red
- #ffffff
- #00ffff
- 3
- black
- red
- #ff0000
- yellow
- red
- 209
- F
- yellow
- 255
- 159
- #ff00ff
- 171
- bright green
- red
- 139
- cyan
- 6
- 15
- white
- blue
- blue
- white
- black
- blue
- #ff00ff
- green
- bright green
- 218
- #000000
- red
- 130
- 40
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids