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, 255, 255)? (a) blue (b) white (c) yellow (d) red
- 2.🌈 Which colour is #000000? (a) magenta (b) black (c) blue (d) cyan
- 3.🌈 In #000800 the green part is the hex number 08. What is it as a normal number?
- 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 6.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) magenta (c) blue (d) cyan
- 7.🌈 Which colour of light is strongest in rgb(115, 101, 200)? (a) blue (b) red (c) green
- 8.🌈 Which colour of light is strongest in rgb(152, 13, 127)? (a) blue (b) green (c) red
- 9.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #000000
- 10.🌈 In #570000 the red part is the hex number 57. What is it as a normal number?
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
- 12.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) magenta (d) red
- 13.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) black (c) magenta (d) red
- 14.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
- 15.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #0000ff (d) #ffff00
- 16.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 100 (d) 99
- 17.🌈 Which colour of light is strongest in rgb(242, 121, 56)? (a) green (b) red (c) blue
- 18.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #0000ff (d) #ffffff
- 19.🌈 Which colour is #ffff00? (a) red (b) blue (c) magenta (d) yellow
- 20.🌈 In #090000 the red part is the hex number 09. What is it as a normal number?
- 21.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
- 22.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?
- 23.🌈 Which colour is #ff00ff? (a) white (b) red (c) magenta (d) bright green
- 24.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
- 25.🌈 Which colour is #ff0000? (a) black (b) red (c) white (d) cyan
- 26.🌈 Which colour of light is strongest in rgb(17, 77, 220)? (a) blue (b) green (c) red
- 27.🌈 Which colour of light is strongest in rgb(106, 72, 207)? (a) green (b) blue (c) red
- 28.🌈 Which colour of light is strongest in rgb(123, 165, 90)? (a) green (b) blue (c) red
- 29.🌈 In #00003d the blue part is the hex number 3d. What is it as a normal number?
- 30.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) bright green (d) blue
- 31.🌈 Which colour of light is strongest in rgb(187, 95, 110)? (a) red (b) blue (c) green
- 32.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) magenta (d) cyan
- 33.🌈 Which colour of light is strongest in rgb(11, 224, 132)? (a) red (b) green (c) blue
- 34.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) cyan (c) bright green (d) yellow
- 35.🌈 In #006e00 the green part is the hex number 6e. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(129, 247, 14)? (a) red (b) blue (c) green
- 37.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 38.🌈 Which colour of light is strongest in rgb(195, 8, 39)? (a) blue (b) red (c) green
- 39.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) white (d) magenta
- 40.🌈 In #000087 the blue part is the hex number 87. What is it as a normal number?
Answer key
- white
- black
- 8
- F
- 3
- cyan
- blue
- red
- #ffff00
- 87
- red
- cyan
- black
- 59
- #00ff00
- 255
- red
- #00ffff
- yellow
- 9
- 129
- 176
- magenta
- 33
- red
- blue
- blue
- green
- 61
- magenta
- red
- blue
- green
- yellow
- 110
- green
- blue
- red
- red
- 135
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids