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 #00ffff? (a) red (b) cyan (c) black (d) yellow
- 2.🌈 Which colour of light is strongest in rgb(150, 18, 62)? (a) blue (b) red (c) green
- 3.🌈 Which hex code is blue? (a) #ff0000 (b) #ffffff (c) #0000ff (d) #00ffff
- 4.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
- 5.🌈 Which colour of light is strongest in rgb(69, 214, 0)? (a) green (b) red (c) blue
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 7.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) blue (c) bright green (d) black
- 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) black (d) blue
- 9.🌈 Which colour is #ffffff? (a) white (b) yellow (c) red (d) magenta
- 10.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) magenta (c) cyan (d) yellow
- 11.🌈 Which colour of light is strongest in rgb(62, 233, 102)? (a) blue (b) green (c) red
- 12.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #00ff00 (d) #ff00ff
- 13.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #ffffff (d) #ffff00
- 14.🌈 In #003900 the green part is the hex number 39. What is it as a normal number?
- 15.🌈 In #000012 the blue part is the hex number 12. What is it as a normal number?
- 16.🌈 Which colour is #ffff00? (a) bright green (b) black (c) yellow (d) white
- 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) blue (c) cyan (d) magenta
- 18.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
- 19.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 20.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff0000
- 21.🌈 Which colour of light is strongest in rgb(173, 38, 67)? (a) blue (b) green (c) red
- 22.🌈 Which colour is #000000? (a) white (b) magenta (c) cyan (d) black
- 23.🌈 Which colour of light is strongest in rgb(0, 167, 82)? (a) red (b) green (c) blue
- 24.🌈 In #040000 the red part is the hex number 04. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) blue (d) black
- 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
- 27.🌈 In #060000 the red part is the hex number 06. What is it as a normal number?
- 28.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) green (d) red
- 29.🌈 Which colour of light is strongest in rgb(14, 180, 123)? (a) green (b) blue (c) red
- 30.🌈 Which colour is #ff0000? (a) white (b) cyan (c) black (d) red
- 31.🌈 In #003a00 the green part is the hex number 3a. What is it as a normal number?
- 32.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) blue (c) yellow (d) red
- 33.🌈 In #9b0000 the red part is the hex number 9b. What is it as a normal number?
- 34.🌈 In #003500 the green part is the hex number 35. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(121, 223, 125)? (a) red (b) blue (c) green
- 36.🌈 Which hex code is magenta? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #000000
- 37.🌈 Which colour of light is strongest in rgb(209, 80, 93)? (a) blue (b) green (c) red
- 38.🌈 Which colour of light is strongest in rgb(85, 189, 22)? (a) green (b) red (c) blue
- 39.🌈 Which colour of light is strongest in rgb(114, 28, 204)? (a) green (b) red (c) blue
- 40.🌈 Which colour of light is strongest in rgb(33, 225, 34)? (a) red (b) blue (c) green
Answer key
- cyan
- red
- #0000ff
- 82
- green
- 3
- bright green
- red
- white
- cyan
- green
- #ffffff
- #000000
- 57
- 18
- yellow
- red
- 127
- 255
- #ff0000
- red
- black
- green
- 4
- black
- F
- 6
- blue
- green
- red
- 58
- yellow
- 155
- 53
- green
- #ff00ff
- red
- green
- blue
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids