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 #ff00ff? (a) white (b) yellow (c) red (d) magenta
- 2.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 3.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) cyan (d) bright green
- 4.🌈 Which colour of light is strongest in rgb(157, 21, 76)? (a) red (b) green (c) blue
- 5.🌈 Which colour of light is strongest in rgb(137, 91, 237)? (a) blue (b) red (c) green
- 6.🌈 In #006a00 the green part is the hex number 6a. What is it as a normal number?
- 7.🌈 In #0000fb the blue part is the hex number fb. What is it as a normal number?
- 8.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) bright green (d) white
- 9.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
- 10.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) black (c) yellow (d) blue
- 11.🌈 Which colour of light is strongest in rgb(50, 58, 163)? (a) green (b) red (c) blue
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 13.🌈 Which colour is #00ffff? (a) white (b) blue (c) cyan (d) red
- 14.🌈 In #000063 the blue part is the hex number 63. What is it as a normal number?
- 15.🌈 Which colour is #000000? (a) cyan (b) blue (c) black (d) bright green
- 16.🌈 Which colour is #0000ff? (a) blue (b) black (c) red (d) magenta
- 17.🌈 In #00004d the blue part is the hex number 4d. What is it as a normal number?
- 18.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) black (c) red (d) white
- 19.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 20.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #ff0000 (d) #00ff00
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 3 (d) 4
- 22.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
- 23.🌈 In #00eb00 the green part is the hex number eb. What is it as a normal number?
- 24.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) black (d) blue
- 25.🌈 Which colour is #00ff00? (a) yellow (b) red (c) white (d) bright green
- 26.🌈 Which hex code is red? (a) #ff00ff (b) #00ff00 (c) #00ffff (d) #ff0000
- 27.🌈 In #00ae00 the green part is the hex number ae. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(185, 67, 44)? (a) red (b) blue (c) green
- 29.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) white (c) red (d) green
- 30.🌈 In #00008b the blue part is the hex number 8b. What is it as a normal number?
- 31.🌈 In #006b00 the green part is the hex number 6b. What is it as a normal number?
- 32.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) red (c) black (d) white
- 33.🌈 Which colour of light is strongest in rgb(10, 45, 201)? (a) green (b) blue (c) red
- 34.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) black (d) cyan
- 35.🌈 Which hex code is yellow? (a) #000000 (b) #ff00ff (c) #00ffff (d) #ffff00
- 36.🌈 Which hex code is cyan? (a) #ffffff (b) #00ff00 (c) #00ffff (d) #0000ff
- 37.🌈 Which colour of light is strongest in rgb(93, 236, 95)? (a) green (b) red (c) blue
- 38.🌈 In #000f00 the green part is the hex number 0f. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(21, 77, 236)? (a) red (b) blue (c) green
- 40.🌈 Which colour is #ffff00? (a) white (b) bright green (c) yellow (d) red
Answer key
- magenta
- F
- bright green
- red
- blue
- 106
- 251
- cyan
- 164
- blue
- blue
- red
- cyan
- 99
- black
- blue
- 77
- white
- 255
- #00ff00
- 3
- 75
- 235
- red
- bright green
- #ff0000
- 174
- red
- blue
- 139
- 107
- black
- blue
- magenta
- #ffff00
- #00ffff
- green
- 15
- blue
- yellow
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids