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) #ff0000 (b) #ffff00 (c) #0000ff (d) #00ff00
- 2.🌈 Which colour is #ffff00? (a) yellow (b) blue (c) black (d) white
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 4.🌈 Which colour of light is strongest in rgb(41, 112, 156)? (a) red (b) blue (c) green
- 5.🌈 Which colour of light is strongest in rgb(7, 210, 0)? (a) green (b) blue (c) red
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 8.🌈 Which hex code is magenta? (a) #000000 (b) #ffff00 (c) #00ffff (d) #ff00ff
- 9.🌈 Which colour is #00ffff? (a) cyan (b) black (c) yellow (d) blue
- 10.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
- 11.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) cyan (d) black
- 12.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) black (c) blue (d) white
- 13.🌈 Which colour of light is strongest in rgb(112, 129, 154)? (a) red (b) blue (c) green
- 14.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) magenta (c) blue (d) black
- 15.🌈 Which colour of light is strongest in rgb(206, 47, 60)? (a) blue (b) green (c) red
- 16.🌈 Which colour of light is strongest in rgb(23, 23, 179)? (a) blue (b) green (c) red
- 17.🌈 In #00002c the blue part is the hex number 2c. What is it as a normal number?
- 18.🌈 Which colour is #ff0000? (a) cyan (b) red (c) magenta (d) blue
- 19.🌈 Which hex code is blue? (a) #ff0000 (b) #0000ff (c) #000000 (d) #ffff00
- 20.🌈 Which colour is #ffffff? (a) white (b) blue (c) magenta (d) bright green
- 21.🌈 Which colour of light is strongest in rgb(251, 38, 42)? (a) green (b) red (c) blue
- 22.🌈 Which colour of light is strongest in rgb(196, 44, 42)? (a) green (b) blue (c) red
- 23.🌈 Which colour is #000000? (a) blue (b) black (c) magenta (d) cyan
- 24.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 25.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) black (d) red
- 26.🌈 Which hex code is cyan? (a) #00ffff (b) #00ff00 (c) #ffff00 (d) #ff00ff
- 27.🌈 In #009700 the green part is the hex number 97. What is it as a normal number?
- 28.🌈 In #290000 the red part is the hex number 29. What is it as a normal number?
- 29.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(175, 87, 69)? (a) red (b) blue (c) green
- 31.🌈 Which colour of light is strongest in rgb(157, 20, 95)? (a) blue (b) green (c) red
- 32.🌈 Which hex code is white? (a) #00ffff (b) #00ff00 (c) #ffffff (d) #ffff00
- 33.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) red (c) bright green (d) yellow
- 34.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) cyan (c) white (d) yellow
- 35.🌈 Which colour of light is strongest in rgb(116, 81, 212)? (a) green (b) red (c) blue
- 36.🌈 Which colour of light is strongest in rgb(139, 206, 58)? (a) green (b) blue (c) red
- 37.🌈 Which colour of light is strongest in rgb(16, 71, 171)? (a) green (b) red (c) blue
- 38.🌈 In #fe0000 the red part is the hex number fe. What is it as a normal number?
- 39.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) yellow (c) red (d) blue
- 40.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
Answer key
- #ff0000
- yellow
- blue
- blue
- green
- red
- 3
- #ff00ff
- cyan
- 255
- bright green
- white
- blue
- blue
- red
- blue
- 44
- red
- #0000ff
- white
- red
- red
- black
- F
- magenta
- #00ffff
- 151
- 41
- 30
- red
- red
- #ffffff
- bright green
- magenta
- blue
- green
- blue
- 254
- yellow
- 39
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids