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) white (b) black (c) yellow (d) bright green
- 2.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 3.🌈 Which colour is #0000ff? (a) black (b) blue (c) white (d) bright green
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) red (d) blue
- 5.🌈 Which colour is #00ffff? (a) blue (b) white (c) bright green (d) cyan
- 6.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #0000ff (d) #ffff00
- 7.🌈 Which hex code is cyan? (a) #000000 (b) #0000ff (c) #00ffff (d) #ff0000
- 8.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) bright green (d) red
- 9.🌈 In #dd0000 the red part is the hex number dd. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(246, 11, 13)? (a) red (b) green (c) blue
- 11.🌈 In #00bf00 the green part is the hex number bf. What is it as a normal number?
- 12.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
- 13.🌈 Which colour of light is strongest in rgb(189, 40, 100)? (a) green (b) red (c) blue
- 14.🌈 In #b40000 the red part is the hex number b4. What is it as a normal number?
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 16.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) yellow (d) bright green
- 17.🌈 Which colour of light is strongest in rgb(111, 76, 170)? (a) green (b) blue (c) red
- 18.🌈 Which colour of light is strongest in rgb(131, 11, 219)? (a) green (b) red (c) blue
- 19.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) magenta (c) blue (d) black
- 20.🌈 Which colour of light is strongest in rgb(161, 121, 109)? (a) green (b) red (c) blue
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 22.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) black (c) green (d) blue
- 23.🌈 Which colour of light is strongest in rgb(35, 17, 225)? (a) blue (b) green (c) red
- 24.🌈 Which colour of light is strongest in rgb(189, 62, 69)? (a) green (b) blue (c) red
- 25.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) black (c) yellow (d) red
- 26.🌈 Which colour of light is strongest in rgb(174, 92, 70)? (a) green (b) red (c) blue
- 27.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
- 28.🌈 In #00009d the blue part is the hex number 9d. What is it as a normal number?
- 29.🌈 In #bc0000 the red part is the hex number bc. What is it as a normal number?
- 30.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) bright green (c) white (d) yellow
- 31.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) black (d) white
- 32.🌈 Which colour of light is strongest in rgb(9, 161, 31)? (a) green (b) blue (c) red
- 33.🌈 Which colour of light is strongest in rgb(48, 58, 153)? (a) red (b) green (c) blue
- 34.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) red (c) magenta (d) white
- 35.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #000000
- 36.🌈 In #430000 the red part is the hex number 43. What is it as a normal number?
- 37.🌈 Which colour is #ffffff? (a) blue (b) white (c) bright green (d) black
- 38.🌈 Which colour is #ffff00? (a) magenta (b) yellow (c) red (d) white
- 39.🌈 Which hex code is white? (a) #ffffff (b) #ff0000 (c) #0000ff (d) #00ffff
- 40.🌈 Which colour is #00ff00? (a) red (b) magenta (c) bright green (d) blue
Answer key
- black
- 255
- blue
- blue
- cyan
- #ffff00
- #00ffff
- bright green
- 221
- red
- 191
- 77
- red
- 180
- F
- black
- blue
- blue
- blue
- red
- 3
- red
- blue
- red
- yellow
- red
- 211
- 157
- 188
- white
- magenta
- green
- blue
- magenta
- #00ff00
- 67
- white
- yellow
- #ffffff
- bright green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids