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) cyan (b) white (c) magenta (d) blue
- 2.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) white (d) cyan
- 3.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
- 4.🌈 In #350000 the red part is the hex number 35. What is it as a normal number?
- 5.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) red (c) magenta (d) bright green
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 7.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
- 8.🌈 Which colour is #ff00ff? (a) bright green (b) black (c) white (d) magenta
- 9.🌈 Which hex code is blue? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #0000ff
- 10.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) black (c) yellow (d) blue
- 11.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) white (c) yellow (d) black
- 12.🌈 In #f80000 the red part is the hex number f8. What is it as a normal number?
- 13.🌈 Which colour is #ff0000? (a) red (b) yellow (c) blue (d) magenta
- 14.🌈 Which colour of light is strongest in rgb(93, 217, 83)? (a) red (b) blue (c) green
- 15.🌈 In #002400 the green part is the hex number 24. What is it as a normal number?
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) white (d) blue
- 17.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 18.🌈 Which colour of light is strongest in rgb(19, 129, 152)? (a) green (b) blue (c) red
- 19.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) black (c) blue (d) magenta
- 20.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffffff (c) #00ffff (d) #ff00ff
- 21.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #0000ff (d) #00ff00
- 22.🌈 In #0000d9 the blue part is the hex number d9. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(203, 11, 123)? (a) green (b) blue (c) red
- 24.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
- 25.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 26.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 27.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?
- 28.🌈 In #b00000 the red part is the hex number b0. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(167, 35, 136)? (a) green (b) blue (c) red
- 30.🌈 In #0c0000 the red part is the hex number 0c. What is it as a normal number?
- 31.🌈 In #00c400 the green part is the hex number c4. What is it as a normal number?
- 32.🌈 In #00006c the blue part is the hex number 6c. What is it as a normal number?
- 33.🌈 Which colour is #ffff00? (a) white (b) blue (c) cyan (d) yellow
- 34.🌈 Which colour of light is strongest in rgb(49, 238, 7)? (a) red (b) blue (c) green
- 35.🌈 Which colour is #0000ff? (a) red (b) white (c) blue (d) bright green
- 36.🌈 In #00e900 the green part is the hex number e9. What is it as a normal number?
- 37.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #00ffff (d) #000000
- 38.🌈 Which colour of light is strongest in rgb(55, 154, 89)? (a) blue (b) red (c) green
- 39.🌈 Which colour of light is strongest in rgb(164, 34, 89)? (a) blue (b) red (c) green
- 40.🌈 Which colour of light is strongest in rgb(111, 27, 225)? (a) blue (b) green (c) red
Answer key
- cyan
- red
- 172
- 53
- magenta
- F
- 3
- magenta
- #0000ff
- blue
- yellow
- 248
- red
- green
- 36
- bright green
- 255
- blue
- black
- #00ffff
- #ff00ff
- 217
- red
- 132
- blue
- red
- 219
- 176
- red
- 12
- 196
- 108
- yellow
- green
- blue
- 233
- #ffff00
- green
- red
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids