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 #0000ff? (a) magenta (b) blue (c) red (d) white
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 5.🌈 Which colour of light is strongest in rgb(69, 188, 104)? (a) red (b) green (c) blue
- 6.🌈 In #300000 the red part is the hex number 30. What is it as a normal number?
- 7.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #ff0000 (d) #ff00ff
- 8.🌈 Which colour is #ff0000? (a) magenta (b) white (c) red (d) cyan
- 9.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) black (d) blue
- 10.🌈 In #0b0000 the red part is the hex number 0b. What is it as a normal number?
- 11.🌈 In #00e600 the green part is the hex number e6. What is it as a normal number?
- 12.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) yellow (c) white (d) black
- 13.🌈 Which colour of light is strongest in rgb(136, 233, 63)? (a) red (b) green (c) blue
- 14.🌈 Which colour of light is strongest in rgb(109, 97, 158)? (a) green (b) blue (c) red
- 15.🌈 Which colour of light is strongest in rgb(70, 205, 67)? (a) blue (b) red (c) green
- 16.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) red (d) yellow
- 17.🌈 Which colour is #000000? (a) white (b) magenta (c) cyan (d) black
- 18.🌈 Which colour of light is strongest in rgb(83, 21, 255)? (a) blue (b) red (c) green
- 19.🌈 In #000b00 the green part is the hex number 0b. What is it as a normal number?
- 20.🌈 Which colour is #ff00ff? (a) magenta (b) yellow (c) cyan (d) red
- 21.🌈 Which colour is #ffff00? (a) black (b) cyan (c) yellow (d) white
- 22.🌈 Which colour of light is strongest in rgb(99, 20, 239)? (a) green (b) red (c) blue
- 23.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
- 24.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) white (d) black
- 25.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) red (d) blue
- 26.🌈 Which colour of light is strongest in rgb(188, 132, 135)? (a) green (b) red (c) blue
- 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 28.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) white (d) blue
- 29.🌈 Which hex code is bright green? (a) #000000 (b) #ff00ff (c) #00ff00 (d) #ffffff
- 30.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff00ff (c) #ffffff (d) #ff0000
- 31.🌈 Which colour of light is strongest in rgb(215, 71, 22)? (a) green (b) blue (c) red
- 32.🌈 In #8e0000 the red part is the hex number 8e. What is it as a normal number?
- 33.🌈 Which hex code is cyan? (a) #ffffff (b) #ff0000 (c) #00ffff (d) #0000ff
- 34.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #0000ff (d) #00ffff
- 35.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
- 36.🌈 In #ce0000 the red part is the hex number ce. What is it as a normal number?
- 37.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
- 38.🌈 In #0000df the blue part is the hex number df. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(11, 160, 42)? (a) blue (b) green (c) red
- 40.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) cyan (c) bright green (d) yellow
Answer key
- blue
- blue
- red
- 255
- green
- 48
- #0000ff
- red
- magenta
- 11
- 230
- yellow
- green
- blue
- green
- blue
- black
- blue
- 11
- magenta
- yellow
- blue
- 163
- white
- bright green
- red
- 3
- bright green
- #00ff00
- #ff00ff
- red
- 142
- #00ffff
- #000000
- 250
- 206
- 65
- 223
- green
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids