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 #008400 the green part is the hex number 84. What is it as a normal number?
- 2.🌈 Which hex code is magenta? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #000000
- 3.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) magenta (c) bright green (d) yellow
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
- 5.🌈 Which colour of light is strongest in rgb(161, 99, 90)? (a) green (b) blue (c) red
- 6.🌈 In #00004a the blue part is the hex number 4a. What is it as a normal number?
- 7.🌈 Which colour of light is strongest in rgb(180, 100, 33)? (a) green (b) blue (c) red
- 8.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
- 9.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) blue (c) bright green (d) white
- 10.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) yellow (d) red
- 11.🌈 In #001400 the green part is the hex number 14. What is it as a normal number?
- 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 13.🌈 Which colour of light is strongest in rgb(12, 67, 182)? (a) red (b) green (c) blue
- 14.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) black (c) cyan (d) magenta
- 15.🌈 Which hex code is black? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #000000
- 16.🌈 Which colour is #00ff00? (a) white (b) bright green (c) red (d) blue
- 17.🌈 In #00ed00 the green part is the hex number ed. What is it as a normal number?
- 18.🌈 Which colour of light is strongest in rgb(101, 11, 248)? (a) red (b) green (c) blue
- 19.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 20.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 21.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) bright green (d) yellow
- 22.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) cyan (d) blue
- 23.🌈 Which colour of light is strongest in rgb(220, 5, 28)? (a) blue (b) green (c) red
- 24.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) white (c) black (d) cyan
- 25.🌈 Which hex code is blue? (a) #0000ff (b) #ff00ff (c) #000000 (d) #ff0000
- 26.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) white (c) red (d) bright green
- 27.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) magenta (d) white
- 28.🌈 Which colour of light is strongest in rgb(32, 3, 155)? (a) red (b) blue (c) green
- 29.🌈 In #830000 the red part is the hex number 83. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(224, 18, 23)? (a) red (b) green (c) blue
- 31.🌈 Which colour of light is strongest in rgb(137, 151, 29)? (a) green (b) red (c) blue
- 32.🌈 Which colour of light is strongest in rgb(224, 80, 25)? (a) red (b) blue (c) green
- 33.🌈 Which colour is #0000ff? (a) white (b) magenta (c) blue (d) yellow
- 34.🌈 Which colour is #00ffff? (a) red (b) magenta (c) yellow (d) cyan
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) black (c) blue (d) white
- 36.🌈 Which colour of light is strongest in rgb(20, 174, 41)? (a) blue (b) red (c) green
- 37.🌈 Which colour of light is strongest in rgb(221, 100, 5)? (a) red (b) green (c) blue
- 38.🌈 Which hex code is yellow? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #000000
- 39.🌈 Which colour of light is strongest in rgb(203, 44, 50)? (a) blue (b) green (c) red
- 40.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
Answer key
- 132
- #ff00ff
- yellow
- red
- red
- 74
- red
- 255
- bright green
- red
- 20
- 3
- blue
- cyan
- #000000
- bright green
- 237
- blue
- blue
- F
- white
- blue
- red
- black
- #0000ff
- magenta
- yellow
- blue
- 131
- red
- green
- red
- blue
- cyan
- red
- green
- red
- #ffff00
- red
- 195
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids