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(0, 255, 0)? (a) black (b) cyan (c) bright green (d) magenta
- 2.🌈 Which colour is #ff0000? (a) cyan (b) red (c) blue (d) magenta
- 3.🌈 Which colour is #0000ff? (a) bright green (b) white (c) cyan (d) blue
- 4.🌈 Which hex code is black? (a) #ff0000 (b) #00ffff (c) #000000 (d) #0000ff
- 5.🌈 Which colour is #ffffff? (a) bright green (b) cyan (c) black (d) white
- 6.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) white (d) blue
- 7.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #ffffff (d) #ff0000
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
- 9.🌈 Which colour of light is strongest in rgb(41, 2, 180)? (a) red (b) green (c) blue
- 10.🌈 Which hex code is white? (a) #ff00ff (b) #00ff00 (c) #ffffff (d) #ff0000
- 11.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) cyan (c) magenta (d) red
- 12.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) yellow (d) red
- 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 14.🌈 In #7d0000 the red part is the hex number 7d. What is it as a normal number?
- 15.🌈 Which hex code is red? (a) #ff0000 (b) #00ffff (c) #ffff00 (d) #0000ff
- 16.🌈 In #00f400 the green part is the hex number f4. What is it as a normal number?
- 17.🌈 Which colour of light is strongest in rgb(30, 62, 158)? (a) green (b) red (c) blue
- 18.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 19.🌈 Which colour of light is strongest in rgb(163, 133, 47)? (a) red (b) green (c) blue
- 20.🌈 Which colour is #000000? (a) bright green (b) black (c) red (d) cyan
- 21.🌈 In #450000 the red part is the hex number 45. What is it as a normal number?
- 22.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 23.🌈 Which colour is #ffff00? (a) yellow (b) red (c) bright green (d) cyan
- 24.🌈 In #003300 the green part is the hex number 33. What is it as a normal number?
- 25.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
- 26.🌈 In #005800 the green part is the hex number 58. What is it as a normal number?
- 27.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #000000 (d) #ffffff
- 28.🌈 Which colour of light is strongest in rgb(98, 163, 69)? (a) blue (b) green (c) red
- 29.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) red (d) white
- 30.🌈 In #e20000 the red part is the hex number e2. What is it as a normal number?
- 31.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
- 32.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) magenta (d) black
- 33.🌈 Which colour of light is strongest in rgb(241, 31, 38)? (a) red (b) green (c) blue
- 34.🌈 In #0000e2 the blue part is the hex number e2. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(174, 44, 72)? (a) blue (b) red (c) green
- 36.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
- 37.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 38.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffff00 (d) #00ff00
- 39.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 40.🌈 Which colour of light is strongest in rgb(35, 169, 0)? (a) red (b) blue (c) green
Answer key
- bright green
- red
- blue
- #000000
- white
- cyan
- #ff00ff
- red
- blue
- #ffffff
- cyan
- bright green
- 3
- 125
- #ff0000
- 244
- blue
- F
- red
- black
- 69
- blue
- yellow
- 51
- 23
- 88
- #00ffff
- green
- red
- 226
- 242
- black
- red
- 226
- red
- 171
- 241
- #0000ff
- 255
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids