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 #450000 the red part is the hex number 45. What is it as a normal number?
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 3.🌈 Which colour of light is strongest in rgb(66, 20, 226)? (a) green (b) blue (c) red
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
- 5.🌈 Which colour is #00ffff? (a) black (b) cyan (c) blue (d) white
- 6.🌈 Which colour of light is strongest in rgb(132, 102, 210)? (a) red (b) blue (c) green
- 7.🌈 Which colour of light is strongest in rgb(155, 118, 102)? (a) blue (b) green (c) red
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
- 9.🌈 In #007600 the green part is the hex number 76. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(166, 77, 76)? (a) blue (b) red (c) green
- 11.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) magenta
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 13.🌈 In #f60000 the red part is the hex number f6. What is it as a normal number?
- 14.🌈 Which colour of light is strongest in rgb(104, 35, 203)? (a) green (b) blue (c) red
- 15.🌈 Which hex code is yellow? (a) #ff0000 (b) #0000ff (c) #ffff00 (d) #ff00ff
- 16.🌈 Which colour of light is strongest in rgb(84, 213, 14)? (a) blue (b) red (c) green
- 17.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #ffffff
- 18.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
- 19.🌈 Which colour is #0000ff? (a) bright green (b) black (c) blue (d) red
- 20.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) white (c) bright green (d) blue
- 21.🌈 Which colour is #ff00ff? (a) white (b) cyan (c) magenta (d) blue
- 22.🌈 Which colour of light is strongest in rgb(27, 92, 170)? (a) blue (b) red (c) green
- 23.🌈 Which colour of light is strongest in rgb(99, 12, 205)? (a) red (b) blue (c) green
- 24.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) red (d) yellow
- 25.🌈 Which hex code is bright green? (a) #000000 (b) #ffff00 (c) #ff00ff (d) #00ff00
- 26.🌈 Which hex code is magenta? (a) #00ffff (b) #00ff00 (c) #ff0000 (d) #ff00ff
- 27.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) magenta (d) yellow
- 28.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(7, 119, 221)? (a) blue (b) red (c) green
- 30.🌈 In #0000cd the blue part is the hex number cd. What is it as a normal number?
- 31.🌈 Which hex code is cyan? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ff0000
- 32.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
- 33.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) magenta
- 34.🌈 In #0000df the blue part is the hex number df. What is it as a normal number?
- 35.🌈 In #460000 the red part is the hex number 46. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(251, 81, 12)? (a) blue (b) green (c) red
- 37.🌈 Which hex code is white? (a) #ff00ff (b) #ff0000 (c) #0000ff (d) #ffffff
- 38.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) cyan
- 39.🌈 Which colour of light is strongest in rgb(243, 130, 41)? (a) green (b) blue (c) red
- 40.🌈 Which colour of light is strongest in rgb(167, 21, 100)? (a) blue (b) red (c) green
Answer key
- 69
- F
- blue
- 3
- cyan
- blue
- red
- red
- 118
- red
- black
- 255
- 246
- blue
- #ffff00
- green
- #ff0000
- blue
- blue
- magenta
- magenta
- blue
- blue
- blue
- #00ff00
- #ff00ff
- black
- 33
- blue
- 205
- #00ffff
- 132
- bright green
- 223
- 70
- red
- #ffffff
- yellow
- red
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids