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) black (b) blue (c) bright green (d) red
- 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
- 3.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #00ffff
- 4.🌈 Which colour is #0000ff? (a) red (b) bright green (c) blue (d) white
- 5.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
- 6.🌈 Which colour of light is strongest in rgb(179, 1, 60)? (a) red (b) green (c) blue
- 7.🌈 In #0000fb the blue part is the hex number fb. What is it as a normal number?
- 8.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) red (c) white (d) cyan
- 9.🌈 Which colour is #ff0000? (a) white (b) cyan (c) red (d) black
- 10.🌈 Which colour is #ffff00? (a) red (b) blue (c) cyan (d) yellow
- 11.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
- 12.🌈 Which colour of light is strongest in rgb(229, 36, 34)? (a) blue (b) red (c) green
- 13.🌈 Which colour of light is strongest in rgb(8, 26, 173)? (a) blue (b) red (c) green
- 14.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) red (c) blue (d) magenta
- 15.🌈 In #ad0000 the red part is the hex number ad. What is it as a normal number?
- 16.🌈 Which hex code is cyan? (a) #ffff00 (b) #00ffff (c) #ff0000 (d) #0000ff
- 17.🌈 Which colour is #ffffff? (a) cyan (b) magenta (c) white (d) red
- 18.🌈 In #000090 the blue part is the hex number 90. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(30, 236, 74)? (a) green (b) blue (c) red
- 20.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
- 21.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 22.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) black (d) magenta
- 23.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #0000ff (d) #ff0000
- 24.🌈 Which hex code is blue? (a) #00ffff (b) #00ff00 (c) #0000ff (d) #ff0000
- 25.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
- 26.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) yellow (d) red
- 27.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
- 28.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) blue (c) red (d) white
- 29.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) blue (d) bright green
- 30.🌈 Which colour of light is strongest in rgb(106, 160, 12)? (a) red (b) green (c) blue
- 31.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?
- 32.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) cyan (c) bright green (d) blue
- 33.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
- 34.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) cyan (c) red (d) blue
- 35.🌈 In #740000 the red part is the hex number 74. What is it as a normal number?
- 36.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) yellow (d) red
- 37.🌈 In #004300 the green part is the hex number 43. What is it as a normal number?
- 38.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #00ff00 (d) #ff0000
- 39.🌈 In #001f00 the green part is the hex number 1f. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(160, 121, 73)? (a) blue (b) green (c) red
Answer key
- black
- 3
- #ff00ff
- blue
- 71
- red
- 251
- cyan
- red
- yellow
- 255
- red
- blue
- magenta
- 173
- #00ffff
- white
- 144
- green
- 30
- red
- bright green
- #00ff00
- #0000ff
- 12
- cyan
- blue
- white
- black
- green
- 63
- bright green
- F
- red
- 116
- magenta
- 67
- #000000
- 31
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids