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 blue? (a) #000000 (b) #0000ff (c) #00ffff (d) #ff0000
- 2.🌈 Which colour of light is strongest in rgb(13, 231, 3)? (a) blue (b) green (c) red
- 3.🌈 Which colour is #0000ff? (a) red (b) bright green (c) blue (d) magenta
- 4.🌈 Which colour of light is strongest in rgb(82, 85, 170)? (a) blue (b) red (c) green
- 5.🌈 In #000098 the blue part is the hex number 98. What is it as a normal number?
- 6.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) magenta (c) black (d) white
- 11.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
- 12.🌈 Which colour of light is strongest in rgb(3, 154, 89)? (a) green (b) blue (c) red
- 13.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
- 14.🌈 In #9e0000 the red part is the hex number 9e. What is it as a normal number?
- 15.🌈 Which colour of light is strongest in rgb(170, 54, 41)? (a) green (b) red (c) blue
- 16.🌈 Which hex code is red? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #00ff00
- 17.🌈 Which colour of light is strongest in rgb(127, 93, 161)? (a) red (b) green (c) blue
- 18.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(77, 193, 20)? (a) red (b) blue (c) green
- 20.🌈 In #009500 the green part is the hex number 95. What is it as a normal number?
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
- 22.🌈 In #00fc00 the green part is the hex number fc. What is it as a normal number?
- 23.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) white (c) cyan (d) red
- 24.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 25.🌈 Which hex code is magenta? (a) #ffffff (b) #ff00ff (c) #0000ff (d) #ff0000
- 26.🌈 In #9a0000 the red part is the hex number 9a. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(32, 37, 189)? (a) blue (b) red (c) green
- 28.🌈 Which colour is #00ff00? (a) yellow (b) cyan (c) black (d) bright green
- 29.🌈 Which colour of light is strongest in rgb(69, 216, 11)? (a) blue (b) green (c) red
- 30.🌈 In #002000 the green part is the hex number 20. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(43, 204, 88)? (a) blue (b) green (c) red
- 32.🌈 In #00de00 the green part is the hex number de. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(68, 12, 226)? (a) blue (b) green (c) red
- 34.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #ffff00 (d) #0000ff
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) cyan (c) red (d) yellow
- 36.🌈 Which colour of light is strongest in rgb(245, 51, 78)? (a) red (b) green (c) blue
- 37.🌈 Which colour is #ffffff? (a) white (b) blue (c) black (d) red
- 38.🌈 Which colour is #ff00ff? (a) magenta (b) cyan (c) bright green (d) red
- 39.🌈 In #008500 the green part is the hex number 85. What is it as a normal number?
- 40.🌈 Which colour is #000000? (a) black (b) cyan (c) bright green (d) blue
Answer key
- #0000ff
- green
- blue
- blue
- 152
- 1
- red
- F
- blue
- white
- 169
- green
- 243
- 158
- red
- #ff0000
- blue
- 55
- green
- 149
- 3
- 252
- cyan
- 255
- #ff00ff
- 154
- blue
- bright green
- green
- 32
- green
- 222
- blue
- #00ff00
- red
- red
- white
- magenta
- 133
- black
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids