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.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) F (d) J
- 2.🌈 Which colour of light is strongest in rgb(126, 219, 89)? (a) blue (b) green (c) red
- 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 4.🌈 Which hex code is cyan? (a) #000000 (b) #ff0000 (c) #00ff00 (d) #00ffff
- 5.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
- 6.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) bright green (c) yellow (d) red
- 7.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 9.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
- 10.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) red (c) yellow (d) magenta
- 11.🌈 Which colour of light is strongest in rgb(54, 252, 45)? (a) red (b) blue (c) green
- 12.🌈 Which hex code is white? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #ffffff
- 13.🌈 Which colour is #ffff00? (a) red (b) cyan (c) yellow (d) white
- 14.🌈 In #c30000 the red part is the hex number c3. What is it as a normal number?
- 15.🌈 Which colour is #00ffff? (a) cyan (b) red (c) black (d) blue
- 16.🌈 Which colour is #0000ff? (a) bright green (b) blue (c) red (d) white
- 17.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
- 18.🌈 Which hex code is magenta? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ff0000
- 19.🌈 In #780000 the red part is the hex number 78. What is it as a normal number?
- 20.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(65, 184, 20)? (a) green (b) red (c) blue
- 22.🌈 In #00b600 the green part is the hex number b6. What is it as a normal number?
- 23.🌈 In #000052 the blue part is the hex number 52. What is it as a normal number?
- 24.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
- 25.🌈 Which hex code is black? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ff0000
- 26.🌈 Which colour of light is strongest in rgb(20, 115, 231)? (a) green (b) blue (c) red
- 27.🌈 Which colour is #ff0000? (a) white (b) cyan (c) red (d) magenta
- 28.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #000000 (d) #ffffff
- 29.🌈 In #000035 the blue part is the hex number 35. What is it as a normal number?
- 30.🌈 Which colour is #ffffff? (a) yellow (b) white (c) red (d) cyan
- 31.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) white (c) black (d) magenta
- 32.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) magenta (c) bright green (d) black
- 33.🌈 Which colour of light is strongest in rgb(248, 60, 72)? (a) red (b) green (c) blue
- 34.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(229, 21, 17)? (a) green (b) red (c) blue
- 36.🌈 Which colour of light is strongest in rgb(205, 59, 126)? (a) green (b) blue (c) red
- 37.🌈 Which colour of light is strongest in rgb(102, 85, 249)? (a) green (b) red (c) blue
- 38.🌈 Which colour is #ff00ff? (a) black (b) blue (c) bright green (d) magenta
- 39.🌈 Which colour of light is strongest in rgb(33, 5, 168)? (a) blue (b) red (c) green
- 40.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) yellow (d) bright green
Answer key
- F
- green
- 3
- #00ffff
- 146
- yellow
- 58
- red
- 77
- black
- green
- #ffffff
- yellow
- 195
- cyan
- blue
- blue
- #ff00ff
- 120
- 211
- green
- 182
- 82
- 255
- #000000
- blue
- red
- #0000ff
- 53
- white
- cyan
- bright green
- red
- 112
- red
- red
- blue
- magenta
- blue
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids