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 #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 2.🌈 Which hex code is bright green? (a) #ff00ff (b) #0000ff (c) #000000 (d) #00ff00
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
- 4.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) magenta (c) black (d) yellow
- 5.🌈 Which colour is #00ffff? (a) black (b) cyan (c) white (d) blue
- 6.🌈 Which colour of light is strongest in rgb(168, 20, 134)? (a) green (b) red (c) blue
- 7.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) blue (c) white (d) bright green
- 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 9.🌈 Which colour is #ff0000? (a) red (b) white (c) blue (d) magenta
- 10.🌈 In #003300 the green part is the hex number 33. What is it as a normal number?
- 11.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
- 12.🌈 Which colour of light is strongest in rgb(99, 213, 12)? (a) red (b) blue (c) green
- 13.🌈 Which colour of light is strongest in rgb(172, 14, 109)? (a) red (b) blue (c) green
- 14.🌈 In #400000 the red part is the hex number 40. What is it as a normal number?
- 15.🌈 In #000080 the blue part is the hex number 80. What is it as a normal number?
- 16.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #00ff00 (d) #ffff00
- 17.🌈 In #570000 the red part is the hex number 57. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(135, 136, 200)? (a) green (b) red (c) blue
- 19.🌈 Which hex code is cyan? (a) #ff0000 (b) #000000 (c) #ff00ff (d) #00ffff
- 20.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) white (c) black (d) blue
- 21.🌈 In #210000 the red part is the hex number 21. What is it as a normal number?
- 22.🌈 Which colour of light is strongest in rgb(222, 21, 58)? (a) red (b) blue (c) green
- 23.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
- 24.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
- 25.🌈 Which colour is #0000ff? (a) bright green (b) yellow (c) blue (d) cyan
- 26.🌈 Which colour of light is strongest in rgb(125, 251, 1)? (a) green (b) red (c) blue
- 27.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
- 28.🌈 In #00bc00 the green part is the hex number bc. What is it as a normal number?
- 29.🌈 Which colour is #ffffff? (a) bright green (b) white (c) magenta (d) cyan
- 30.🌈 Which colour of light is strongest in rgb(105, 253, 10)? (a) blue (b) red (c) green
- 31.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) magenta (d) red
- 32.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
- 33.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #ffff00 (d) #00ffff
- 34.🌈 In #002000 the green part is the hex number 20. What is it as a normal number?
- 35.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
- 36.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) magenta (c) bright green (d) cyan
- 37.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) bright green (c) magenta (d) red
- 38.🌈 Which colour of light is strongest in rgb(5, 248, 16)? (a) red (b) green (c) blue
- 39.🌈 Which colour of light is strongest in rgb(49, 157, 121)? (a) red (b) green (c) blue
- 40.🌈 In #0000a7 the blue part is the hex number a7. What is it as a normal number?
Answer key
- blue
- #00ff00
- red
- yellow
- cyan
- red
- bright green
- 3
- red
- 51
- 255
- green
- red
- 64
- 128
- #ff00ff
- 87
- blue
- #00ffff
- black
- 33
- red
- 112
- 12
- blue
- green
- 80
- 188
- white
- green
- cyan
- 36
- #ff0000
- 32
- 180
- white
- magenta
- green
- green
- 167
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids