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 rgb(255, 0, 255)? (a) blue (b) red (c) magenta (d) cyan
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
- 3.🌈 Which hex code is white? (a) #000000 (b) #00ff00 (c) #ffffff (d) #ff0000
- 4.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) black (d) white
- 5.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) cyan (d) yellow
- 6.🌈 In #000023 the blue part is the hex number 23. What is it as a normal number?
- 7.🌈 Which hex code is blue? (a) #ffffff (b) #ff0000 (c) #00ffff (d) #0000ff
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
- 9.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) blue (d) red
- 10.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) white (d) green
- 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
- 12.🌈 Which colour is #00ffff? (a) white (b) cyan (c) bright green (d) blue
- 13.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
- 14.🌈 Which colour of light is strongest in rgb(80, 128, 172)? (a) green (b) red (c) blue
- 15.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #00ffff (d) #0000ff
- 16.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) cyan (c) yellow (d) red
- 17.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) red (c) blue (d) yellow
- 18.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ffff (d) #ffff00
- 19.🌈 Which colour is #ffffff? (a) yellow (b) white (c) magenta (d) blue
- 20.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) blue (c) cyan (d) white
- 21.🌈 Which colour of light is strongest in rgb(72, 139, 210)? (a) red (b) green (c) blue
- 22.🌈 Which colour is #000000? (a) white (b) yellow (c) black (d) red
- 23.🌈 Which colour of light is strongest in rgb(110, 173, 106)? (a) blue (b) red (c) green
- 24.🌈 Which colour of light is strongest in rgb(154, 17, 108)? (a) red (b) green (c) blue
- 25.🌈 In #000058 the blue part is the hex number 58. What is it as a normal number?
- 26.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
- 27.🌈 In #0000af the blue part is the hex number af. What is it as a normal number?
- 28.🌈 Which hex code is black? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #00ff00
- 29.🌈 Which colour is #00ff00? (a) blue (b) red (c) bright green (d) white
- 30.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) bright green (d) cyan
- 31.🌈 Which colour is #ffff00? (a) red (b) magenta (c) yellow (d) blue
- 32.🌈 Which colour of light is strongest in rgb(130, 79, 171)? (a) red (b) green (c) blue
- 33.🌈 Which colour of light is strongest in rgb(228, 60, 67)? (a) blue (b) red (c) green
- 34.🌈 In #006100 the green part is the hex number 61. What is it as a normal number?
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) blue (c) magenta (d) red
- 36.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
- 37.🌈 Which hex code is yellow? (a) #00ff00 (b) #000000 (c) #ffff00 (d) #ffffff
- 38.🌈 In #00af00 the green part is the hex number af. What is it as a normal number?
- 39.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
- 40.🌈 In #000062 the blue part is the hex number 62. What is it as a normal number?
Answer key
- magenta
- red
- #ffffff
- blue
- blue
- 35
- #0000ff
- F
- black
- blue
- 3
- cyan
- 255
- blue
- #ff0000
- cyan
- yellow
- #00ffff
- white
- white
- blue
- black
- green
- red
- 88
- 71
- 175
- #000000
- bright green
- magenta
- yellow
- blue
- red
- 97
- red
- 202
- #ffff00
- 175
- 228
- 98
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids