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 rgb(255, 0, 255)? (a) yellow (b) red (c) blue (d) magenta
- 2.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
- 3.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #ffff00
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 5.🌈 Which colour of light is strongest in rgb(49, 247, 119)? (a) red (b) blue (c) green
- 6.🌈 Which colour of light is strongest in rgb(139, 89, 226)? (a) blue (b) red (c) green
- 7.🌈 Which hex code is black? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ffff
- 8.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 9.🌈 Which hex code is red? (a) #00ff00 (b) #ffff00 (c) #ff0000 (d) #00ffff
- 10.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) cyan (d) blue
- 11.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 2 (d) 3
- 12.🌈 Which colour of light is strongest in rgb(126, 13, 174)? (a) blue (b) green (c) red
- 13.🌈 Which hex code is blue? (a) #ff00ff (b) #ffffff (c) #0000ff (d) #ffff00
- 14.🌈 In #0000ef the blue part is the hex number ef. What is it as a normal number?
- 15.🌈 Which colour of light is strongest in rgb(48, 15, 222)? (a) red (b) green (c) blue
- 16.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) cyan (c) red (d) blue
- 17.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
- 18.🌈 In #00df00 the green part is the hex number df. What is it as a normal number?
- 19.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #00ffff
- 20.🌈 Which colour of light is strongest in rgb(84, 21, 185)? (a) blue (b) red (c) green
- 21.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) red (d) blue
- 22.🌈 Which colour is #ffff00? (a) cyan (b) yellow (c) white (d) black
- 23.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) yellow (d) red
- 24.🌈 Which colour is #ff0000? (a) bright green (b) yellow (c) cyan (d) red
- 25.🌈 Which colour is rgb(255, 255, 0)? (a) white (b) yellow (c) red (d) cyan
- 26.🌈 In #690000 the red part is the hex number 69. What is it as a normal number?
- 27.🌈 Which colour is #0000ff? (a) magenta (b) white (c) blue (d) red
- 28.🌈 In #4e0000 the red part is the hex number 4e. What is it as a normal number?
- 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) G (d) J
- 30.🌈 Which colour of light is strongest in rgb(89, 196, 23)? (a) blue (b) red (c) green
- 31.🌈 In #006800 the green part is the hex number 68. What is it as a normal number?
- 32.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) red (c) black (d) white
- 33.🌈 Which colour is #000000? (a) white (b) red (c) black (d) cyan
- 34.🌈 In #170000 the red part is the hex number 17. What is it as a normal number?
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) magenta (c) white (d) red
- 36.🌈 Which colour of light is strongest in rgb(103, 179, 41)? (a) red (b) green (c) blue
- 37.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #ff00ff (d) #0000ff
- 38.🌈 Which colour of light is strongest in rgb(34, 105, 210)? (a) red (b) green (c) blue
- 39.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) magenta (c) cyan (d) black
- 40.🌈 Which colour of light is strongest in rgb(63, 221, 8)? (a) green (b) red (c) blue
Answer key
- magenta
- 42
- #ffffff
- blue
- green
- blue
- #000000
- 255
- #ff0000
- magenta
- 3
- blue
- #0000ff
- 239
- blue
- blue
- red
- 223
- #00ff00
- blue
- cyan
- yellow
- bright green
- red
- yellow
- 105
- blue
- 78
- F
- green
- 104
- white
- black
- 23
- red
- green
- #00ffff
- blue
- cyan
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids