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.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
- 2.🌈 Which colour of light is strongest in rgb(29, 207, 64)? (a) red (b) blue (c) green
- 3.🌈 Which colour is #ffff00? (a) magenta (b) yellow (c) bright green (d) white
- 4.🌈 Which colour of light is strongest in rgb(37, 205, 130)? (a) red (b) blue (c) green
- 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 6.🌈 Which hex code is magenta? (a) #00ff00 (b) #0000ff (c) #ff00ff (d) #ffffff
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 8.🌈 Which colour of light is strongest in rgb(155, 35, 78)? (a) red (b) green (c) blue
- 9.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) magenta (c) blue (d) yellow
- 10.🌈 Which colour of light is strongest in rgb(13, 166, 93)? (a) red (b) blue (c) green
- 11.🌈 Which colour of light is strongest in rgb(247, 104, 125)? (a) green (b) blue (c) red
- 12.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) cyan (d) blue
- 13.🌈 Which hex code is white? (a) #ff0000 (b) #000000 (c) #00ffff (d) #ffffff
- 14.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
- 15.🌈 In #000400 the green part is the hex number 04. What is it as a normal number?
- 16.🌈 Which colour is #ff0000? (a) bright green (b) cyan (c) yellow (d) red
- 17.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
- 18.🌈 In #cc0000 the red part is the hex number cc. What is it as a normal number?
- 19.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
- 20.🌈 Which colour of light is strongest in rgb(124, 72, 152)? (a) blue (b) green (c) red
- 21.🌈 In #00bb00 the green part is the hex number bb. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(128, 31, 153)? (a) blue (b) green (c) red
- 23.🌈 Which colour of light is strongest in rgb(161, 86, 121)? (a) green (b) red (c) blue
- 24.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #ff0000 (d) #00ff00
- 25.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) bright green (c) blue (d) magenta
- 26.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) cyan (c) bright green (d) black
- 27.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #00ffff (d) #ff00ff
- 28.🌈 Which colour is #00ff00? (a) red (b) black (c) magenta (d) bright green
- 29.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 30.🌈 In #001400 the green part is the hex number 14. What is it as a normal number?
- 31.🌈 In #00ec00 the green part is the hex number ec. What is it as a normal number?
- 32.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #00ff00 (d) #ffff00
- 33.🌈 Which colour of light is strongest in rgb(242, 81, 58)? (a) green (b) red (c) blue
- 34.🌈 Which colour of light is strongest in rgb(95, 110, 210)? (a) green (b) red (c) blue
- 35.🌈 Which colour of light is strongest in rgb(96, 242, 18)? (a) red (b) blue (c) green
- 36.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) white (c) red (d) yellow
- 37.🌈 Which colour is #00ffff? (a) blue (b) red (c) cyan (d) magenta
- 38.🌈 Which colour of light is strongest in rgb(190, 96, 110)? (a) green (b) blue (c) red
- 39.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 40.🌈 Which colour is #000000? (a) black (b) blue (c) magenta (d) yellow
Answer key
- 92
- green
- yellow
- green
- F
- #ff00ff
- 3
- red
- yellow
- green
- red
- bright green
- #ffffff
- 123
- 4
- red
- red
- 204
- 71
- blue
- 187
- blue
- red
- #000000
- magenta
- black
- #00ff00
- bright green
- 255
- 20
- 236
- #ff0000
- red
- blue
- green
- blue
- cyan
- red
- blue
- black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids