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.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 2.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) red (c) cyan (d) black
- 3.🌈 Which colour of light is strongest in rgb(93, 219, 127)? (a) blue (b) red (c) green
- 4.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
- 5.🌈 Which colour is #000000? (a) magenta (b) white (c) black (d) red
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 7.🌈 Which colour of light is strongest in rgb(8, 160, 98)? (a) blue (b) green (c) red
- 8.🌈 In #009000 the green part is the hex number 90. What is it as a normal number?
- 9.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 10.🌈 Which colour of light is strongest in rgb(208, 37, 122)? (a) blue (b) green (c) red
- 11.🌈 Which colour is #0000ff? (a) red (b) white (c) magenta (d) blue
- 12.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #000000
- 13.🌈 Which colour is #ffffff? (a) bright green (b) blue (c) white (d) red
- 14.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) blue
- 15.🌈 In #00c400 the green part is the hex number c4. What is it as a normal number?
- 16.🌈 Which colour of light is strongest in rgb(182, 25, 134)? (a) blue (b) green (c) red
- 17.🌈 In #001300 the green part is the hex number 13. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(245, 20, 138)? (a) red (b) blue (c) green
- 19.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) magenta (c) red (d) bright green
- 20.🌈 Which colour of light is strongest in rgb(175, 129, 36)? (a) blue (b) red (c) green
- 21.🌈 Which colour is #ffff00? (a) black (b) bright green (c) red (d) yellow
- 22.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) bright green (c) yellow (d) white
- 23.🌈 Which colour of light is strongest in rgb(158, 102, 134)? (a) green (b) blue (c) red
- 24.🌈 In #000a00 the green part is the hex number 0a. What is it as a normal number?
- 25.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) blue (d) black
- 26.🌈 In #8d0000 the red part is the hex number 8d. What is it as a normal number?
- 27.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) white (d) blue
- 28.🌈 Which hex code is blue? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #0000ff
- 29.🌈 In #00003d the blue part is the hex number 3d. What is it as a normal number?
- 30.🌈 In #00de00 the green part is the hex number de. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(50, 61, 157)? (a) blue (b) red (c) green
- 32.🌈 Which colour of light is strongest in rgb(202, 110, 94)? (a) green (b) red (c) blue
- 33.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) bright green (c) magenta (d) white
- 34.🌈 In #000028 the blue part is the hex number 28. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(24, 95, 191)? (a) red (b) green (c) blue
- 36.🌈 Which colour of light is strongest in rgb(45, 55, 242)? (a) green (b) red (c) blue
- 37.🌈 Which hex code is yellow? (a) #ffff00 (b) #00ffff (c) #00ff00 (d) #000000
- 38.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?
- 39.🌈 In #5a0000 the red part is the hex number 5a. What is it as a normal number?
- 40.🌈 In #006000 the green part is the hex number 60. What is it as a normal number?
Answer key
- 255
- black
- green
- 3
- black
- blue
- green
- 144
- F
- red
- blue
- #00ffff
- white
- yellow
- 196
- red
- 19
- red
- bright green
- red
- yellow
- blue
- red
- 10
- red
- 141
- bright green
- #0000ff
- 61
- 222
- blue
- red
- white
- 40
- blue
- blue
- #ffff00
- 9
- 90
- 96
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids