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 hex code is red? (a) #00ff00 (b) #ff0000 (c) #ffffff (d) #ff00ff
- 2.🌈 Which hex code is black? (a) #00ffff (b) #000000 (c) #ff0000 (d) #00ff00
- 3.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) white (c) yellow (d) red
- 4.🌈 Which colour is #0000ff? (a) blue (b) yellow (c) bright green (d) cyan
- 5.🌈 Which hex code is bright green? (a) #00ffff (b) #000000 (c) #ffffff (d) #00ff00
- 6.🌈 In #008000 the green part is the hex number 80. What is it as a normal number?
- 7.🌈 In #00d000 the green part is the hex number d0. What is it as a normal number?
- 8.🌈 Which colour is #ffff00? (a) blue (b) red (c) black (d) yellow
- 9.🌈 Which colour is #ff0000? (a) cyan (b) yellow (c) white (d) red
- 10.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #00ffff (d) #00ff00
- 11.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 12.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
- 13.🌈 Which colour of light is strongest in rgb(232, 31, 34)? (a) green (b) blue (c) red
- 14.🌈 In #009500 the green part is the hex number 95. What is it as a normal number?
- 15.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) yellow (c) cyan (d) magenta
- 16.🌈 In #000037 the blue part is the hex number 37. What is it as a normal number?
- 17.🌈 Which colour of light is strongest in rgb(31, 32, 150)? (a) red (b) blue (c) green
- 18.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
- 19.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) black (c) cyan (d) bright green
- 20.🌈 In #950000 the red part is the hex number 95. What is it as a normal number?
- 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
- 22.🌈 Which hex code is blue? (a) #ff00ff (b) #000000 (c) #0000ff (d) #00ff00
- 23.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) blue (c) bright green (d) cyan
- 24.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 25.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 1000 (d) 100
- 26.🌈 Which colour of light is strongest in rgb(210, 40, 35)? (a) blue (b) green (c) red
- 27.🌈 Which colour of light is strongest in rgb(227, 118, 82)? (a) green (b) red (c) blue
- 28.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) red (c) white (d) blue
- 29.🌈 Which colour of light is strongest in rgb(79, 195, 126)? (a) green (b) red (c) blue
- 30.🌈 In #00004e the blue part is the hex number 4e. What is it as a normal number?
- 31.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) black (c) blue (d) magenta
- 32.🌈 Which colour of light is strongest in rgb(34, 30, 150)? (a) green (b) blue (c) red
- 33.🌈 Which colour of light is strongest in rgb(62, 29, 252)? (a) green (b) blue (c) red
- 34.🌈 In #006700 the green part is the hex number 67. What is it as a normal number?
- 35.🌈 Which hex code is magenta? (a) #ffff00 (b) #000000 (c) #00ff00 (d) #ff00ff
- 36.🌈 Which colour of light is strongest in rgb(94, 241, 116)? (a) green (b) blue (c) red
- 37.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(160, 14, 21)? (a) green (b) blue (c) red
- 39.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #000000 (d) #ffff00
- 40.🌈 Which colour of light is strongest in rgb(200, 129, 0)? (a) blue (b) green (c) red
Answer key
- #ff0000
- #000000
- yellow
- blue
- #00ff00
- 128
- 208
- yellow
- red
- #ffff00
- red
- 195
- red
- 149
- cyan
- 55
- blue
- 3
- bright green
- 149
- F
- #0000ff
- blue
- blue
- 255
- red
- red
- white
- green
- 78
- magenta
- blue
- blue
- 103
- #ff00ff
- green
- 27
- red
- #ffffff
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids