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) #ff00ff (c) #00ff00 (d) #ffff00
- 2.🌈 In #f40000 the red part is the hex number f4. What is it as a normal number?
- 3.🌈 In #00fd00 the green part is the hex number fd. What is it as a normal number?
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 5.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
- 7.🌈 Which hex code is red? (a) #00ff00 (b) #ffffff (c) #ffff00 (d) #ff0000
- 8.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) cyan (c) yellow (d) white
- 9.🌈 Which colour of light is strongest in rgb(244, 61, 46)? (a) green (b) blue (c) red
- 10.🌈 Which hex code is blue? (a) #ff0000 (b) #ffff00 (c) #000000 (d) #0000ff
- 11.🌈 Which colour is #ffffff? (a) cyan (b) white (c) black (d) yellow
- 12.🌈 Which colour is #00ff00? (a) red (b) blue (c) bright green (d) cyan
- 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
- 14.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
- 15.🌈 In #000027 the blue part is the hex number 27. What is it as a normal number?
- 16.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
- 17.🌈 Which colour of light is strongest in rgb(250, 80, 26)? (a) blue (b) green (c) red
- 18.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
- 19.🌈 Which colour is #00ffff? (a) white (b) red (c) cyan (d) bright green
- 20.🌈 Which colour is #ff0000? (a) black (b) magenta (c) white (d) red
- 21.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) bright green (c) magenta (d) red
- 22.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) red (c) bright green (d) white
- 23.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) black (c) red (d) bright green
- 24.🌈 Which colour is #ff00ff? (a) red (b) white (c) bright green (d) magenta
- 25.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) black (c) yellow (d) cyan
- 26.🌈 Which colour is #ffff00? (a) yellow (b) black (c) blue (d) magenta
- 27.🌈 Which hex code is bright green? (a) #ffff00 (b) #0000ff (c) #00ff00 (d) #ffffff
- 28.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) black (c) blue (d) magenta
- 29.🌈 Which colour is #0000ff? (a) blue (b) black (c) yellow (d) magenta
- 30.🌈 In #d10000 the red part is the hex number d1. What is it as a normal number?
- 31.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
- 32.🌈 Which colour is #000000? (a) bright green (b) black (c) blue (d) yellow
- 33.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) cyan (c) blue (d) magenta
- 34.🌈 In #0000d0 the blue part is the hex number d0. What is it as a normal number?
- 35.🌈 In #0000f1 the blue part is the hex number f1. What is it as a normal number?
- 36.🌈 In #000036 the blue part is the hex number 36. What is it as a normal number?
- 37.🌈 In #130000 the red part is the hex number 13. What is it as a normal number?
- 38.🌈 Which hex code is cyan? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #000000
- 39.🌈 In #00c500 the green part is the hex number c5. What is it as a normal number?
- 40.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
Answer key
- #ffff00
- 244
- 253
- red
- 77
- blue
- #ff0000
- yellow
- red
- #0000ff
- white
- bright green
- 3
- 141
- 39
- F
- red
- 242
- cyan
- red
- red
- white
- bright green
- magenta
- cyan
- yellow
- #00ff00
- blue
- blue
- 209
- 255
- black
- magenta
- 208
- 241
- 54
- 19
- #00ffff
- 197
- 65
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids