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 #000000? (a) bright green (b) white (c) blue (d) black
- 2.🌈 In #007000 the green part is the hex number 70. What is it as a normal number?
- 3.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) blue (c) black (d) red
- 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
- 5.🌈 In #af0000 the red part is the hex number af. What is it as a normal number?
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 7.🌈 In #000600 the green part is the hex number 06. What is it as a normal number?
- 8.🌈 In #000073 the blue part is the hex number 73. What is it as a normal number?
- 9.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) blue (c) bright green (d) black
- 10.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) white (c) magenta (d) red
- 11.🌈 Which colour of light is strongest in rgb(112, 38, 238)? (a) blue (b) red (c) green
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
- 13.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ff00ff
- 14.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
- 15.🌈 Which hex code is cyan? (a) #00ffff (b) #ffff00 (c) #ff00ff (d) #ffffff
- 16.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) red (c) white (d) cyan
- 17.🌈 Which hex code is red? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #00ff00
- 18.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) black (d) cyan
- 19.🌈 Which colour of light is strongest in rgb(3, 211, 122)? (a) red (b) blue (c) green
- 20.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) blue (d) magenta
- 21.🌈 Which colour of light is strongest in rgb(14, 56, 151)? (a) blue (b) green (c) red
- 22.🌈 In #000000 the blue part is the hex number 00. What is it as a normal number?
- 23.🌈 Which hex code is black? (a) #00ffff (b) #000000 (c) #ff00ff (d) #ffffff
- 24.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #ff00ff (d) #ffff00
- 25.🌈 Which colour of light is strongest in rgb(91, 216, 52)? (a) green (b) blue (c) red
- 26.🌈 Which colour of light is strongest in rgb(55, 195, 72)? (a) red (b) green (c) blue
- 27.🌈 In #5b0000 the red part is the hex number 5b. What is it as a normal number?
- 28.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) magenta (d) blue
- 29.🌈 Which colour is #00ffff? (a) cyan (b) white (c) magenta (d) black
- 30.🌈 Which colour of light is strongest in rgb(252, 118, 18)? (a) blue (b) red (c) green
- 31.🌈 In #0000dc the blue part is the hex number dc. What is it as a normal number?
- 32.🌈 In #6e0000 the red part is the hex number 6e. What is it as a normal number?
- 33.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) red (c) white (d) cyan
- 34.🌈 Which colour is #ffff00? (a) red (b) magenta (c) blue (d) yellow
- 35.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) bright green (c) white (d) red
- 36.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 37.🌈 Which colour of light is strongest in rgb(161, 112, 55)? (a) red (b) green (c) blue
- 38.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
- 39.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ff00ff
- 40.🌈 In #009700 the green part is the hex number 97. What is it as a normal number?
Answer key
- black
- 112
- red
- F
- 175
- 3
- 6
- 115
- black
- magenta
- blue
- 255
- #0000ff
- 127
- #00ffff
- white
- #ff0000
- blue
- green
- magenta
- blue
- 0
- #000000
- #ff00ff
- green
- green
- 91
- bright green
- cyan
- red
- 220
- 110
- cyan
- yellow
- bright green
- blue
- red
- 11
- #00ff00
- 151
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids