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 is #ffffff? (a) black (b) cyan (c) white (d) bright green
- 2.🌈 In #780000 the red part is the hex number 78. What is it as a normal number?
- 3.🌈 Which colour is #0000ff? (a) bright green (b) red (c) black (d) blue
- 4.🌈 Which colour is #00ffff? (a) white (b) cyan (c) red (d) yellow
- 5.🌈 In #6f0000 the red part is the hex number 6f. What is it as a normal number?
- 6.🌈 Which hex code is bright green? (a) #0000ff (b) #ffffff (c) #00ffff (d) #00ff00
- 7.🌈 Which colour is #000000? (a) bright green (b) red (c) black (d) blue
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 9.🌈 Which colour of light is strongest in rgb(209, 107, 32)? (a) blue (b) red (c) green
- 10.🌈 Which colour is #00ff00? (a) white (b) bright green (c) yellow (d) cyan
- 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 12.🌈 Which colour of light is strongest in rgb(88, 70, 169)? (a) blue (b) green (c) red
- 13.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #00ffff (d) #ff0000
- 14.🌈 Which hex code is white? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #ff0000
- 15.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
- 16.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
- 17.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) red (d) white
- 18.🌈 In #0000ba the blue part is the hex number ba. What is it as a normal number?
- 19.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) white (c) yellow (d) cyan
- 20.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) cyan (c) red (d) blue
- 21.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) red (d) black
- 22.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
- 23.🌈 In #000027 the blue part is the hex number 27. What is it as a normal number?
- 24.🌈 Which hex code is yellow? (a) #ffff00 (b) #ffffff (c) #ff00ff (d) #000000
- 25.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(36, 126, 253)? (a) green (b) red (c) blue
- 27.🌈 In #3d0000 the red part is the hex number 3d. What is it as a normal number?
- 28.🌈 In #c20000 the red part is the hex number c2. What is it as a normal number?
- 29.🌈 In #005900 the green part is the hex number 59. What is it as a normal number?
- 30.🌈 In #000051 the blue part is the hex number 51. What is it as a normal number?
- 31.🌈 In #660000 the red part is the hex number 66. What is it as a normal number?
- 32.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) cyan (c) red (d) blue
- 33.🌈 Which colour of light is strongest in rgb(247, 109, 65)? (a) blue (b) green (c) red
- 34.🌈 In #006800 the green part is the hex number 68. What is it as a normal number?
- 35.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) blue (d) black
- 36.🌈 Which colour of light is strongest in rgb(73, 238, 100)? (a) red (b) blue (c) green
- 37.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 38.🌈 Which colour of light is strongest in rgb(81, 21, 163)? (a) blue (b) green (c) red
- 39.🌈 In #0000b2 the blue part is the hex number b2. What is it as a normal number?
- 40.🌈 In #003700 the green part is the hex number 37. What is it as a normal number?
Answer key
- white
- 120
- blue
- cyan
- 111
- #00ff00
- black
- red
- red
- bright green
- 3
- blue
- #0000ff
- #ffffff
- 192
- 255
- blue
- 186
- yellow
- red
- black
- 249
- 39
- #ffff00
- 172
- blue
- 61
- 194
- 89
- 81
- 102
- blue
- red
- 104
- magenta
- green
- F
- blue
- 178
- 55
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids