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.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 2.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) bright green (d) red
- 3.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) red (d) blue
- 4.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) blue (c) magenta (d) cyan
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 4 (d) 6
- 6.🌈 In #000016 the blue part is the hex number 16. What is it as a normal number?
- 7.🌈 Which colour of light is strongest in rgb(92, 218, 3)? (a) red (b) blue (c) green
- 8.🌈 Which colour is #ffffff? (a) blue (b) black (c) yellow (d) white
- 9.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) yellow (d) white
- 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
- 11.🌈 In #00009c the blue part is the hex number 9c. What is it as a normal number?
- 12.🌈 Which colour of light is strongest in rgb(188, 122, 23)? (a) blue (b) red (c) green
- 13.🌈 Which colour is #000000? (a) black (b) bright green (c) white (d) magenta
- 14.🌈 Which colour of light is strongest in rgb(12, 130, 205)? (a) red (b) green (c) blue
- 15.🌈 Which colour of light is strongest in rgb(71, 245, 106)? (a) green (b) red (c) blue
- 16.🌈 Which hex code is yellow? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #ffff00
- 17.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) blue (c) cyan (d) bright green
- 18.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 19.🌈 Which colour is #00ffff? (a) bright green (b) magenta (c) cyan (d) white
- 20.🌈 Which colour is #ff0000? (a) cyan (b) magenta (c) white (d) red
- 21.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
- 22.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff00ff (c) #ffff00 (d) #00ffff
- 23.🌈 In #00ca00 the green part is the hex number ca. What is it as a normal number?
- 24.🌈 Which colour is #ff00ff? (a) yellow (b) red (c) magenta (d) bright green
- 25.🌈 Which colour is #00ff00? (a) blue (b) red (c) bright green (d) white
- 26.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
- 27.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) cyan (d) white
- 28.🌈 Which hex code is magenta? (a) #ff00ff (b) #0000ff (c) #ffffff (d) #ff0000
- 29.🌈 Which colour of light is strongest in rgb(109, 241, 75)? (a) blue (b) red (c) green
- 30.🌈 Which colour is #ffff00? (a) red (b) yellow (c) black (d) bright green
- 31.🌈 Which colour of light is strongest in rgb(55, 99, 249)? (a) red (b) green (c) blue
- 32.🌈 Which colour of light is strongest in rgb(251, 77, 128)? (a) red (b) green (c) blue
- 33.🌈 In #007300 the green part is the hex number 73. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(88, 193, 93)? (a) blue (b) red (c) green
- 35.🌈 Which hex code is blue? (a) #000000 (b) #0000ff (c) #ffffff (d) #ffff00
- 36.🌈 In #003c00 the green part is the hex number 3c. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) white (c) magenta (d) cyan
- 38.🌈 Which colour of light is strongest in rgb(178, 121, 80)? (a) red (b) blue (c) green
- 39.🌈 Which hex code is cyan? (a) #00ffff (b) #ff0000 (c) #00ff00 (d) #000000
- 40.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #ffff00 (d) #ff0000
Answer key
- red
- black
- white
- magenta
- 3
- 22
- green
- white
- blue
- F
- 156
- red
- black
- blue
- green
- #ffff00
- cyan
- blue
- cyan
- red
- 45
- #00ff00
- 202
- magenta
- bright green
- 126
- bright green
- #ff00ff
- green
- yellow
- blue
- red
- 115
- green
- #0000ff
- 60
- red
- red
- #00ffff
- #000000
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids