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(0, 255, 255)? (a) bright green (b) yellow (c) red (d) cyan
- 2.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ffff00
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) blue (d) red
- 4.🌈 Which colour is #000000? (a) yellow (b) red (c) cyan (d) black
- 5.🌈 Which colour of light is strongest in rgb(55, 176, 95)? (a) red (b) blue (c) green
- 6.🌈 In #007800 the green part is the hex number 78. What is it as a normal number?
- 7.🌈 In #00b500 the green part is the hex number b5. What is it as a normal number?
- 8.🌈 Which colour is #ffff00? (a) bright green (b) black (c) yellow (d) red
- 9.🌈 Which colour is #ffffff? (a) cyan (b) white (c) black (d) red
- 10.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
- 11.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #0000ff
- 12.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #ff0000 (d) #00ff00
- 13.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) black (d) blue
- 14.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
- 15.🌈 Which colour is #0000ff? (a) cyan (b) bright green (c) magenta (d) blue
- 16.🌈 Which colour is #00ff00? (a) magenta (b) red (c) bright green (d) blue
- 17.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 18.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #ff0000 (d) #00ff00
- 19.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) magenta (c) bright green (d) blue
- 20.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) white (c) magenta (d) red
- 21.🌈 In #00c900 the green part is the hex number c9. What is it as a normal number?
- 22.🌈 In #c40000 the red part is the hex number c4. What is it as a normal number?
- 23.🌈 In #0000b1 the blue part is the hex number b1. What is it as a normal number?
- 24.🌈 In #7f0000 the red part is the hex number 7f. What is it as a normal number?
- 25.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(155, 84, 125)? (a) blue (b) red (c) green
- 27.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
- 28.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
- 29.🌈 Which hex code is red? (a) #00ffff (b) #0000ff (c) #ff0000 (d) #ffffff
- 30.🌈 Which colour of light is strongest in rgb(34, 156, 105)? (a) green (b) blue (c) red
- 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
- 32.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) white (c) cyan (d) blue
- 33.🌈 Which colour of light is strongest in rgb(75, 112, 167)? (a) blue (b) red (c) green
- 34.🌈 Which colour of light is strongest in rgb(34, 206, 42)? (a) red (b) blue (c) green
- 35.🌈 Which colour of light is strongest in rgb(27, 76, 175)? (a) green (b) blue (c) red
- 36.🌈 In #0000e6 the blue part is the hex number e6. What is it as a normal number?
- 37.🌈 In #260000 the red part is the hex number 26. What is it as a normal number?
- 38.🌈 Which hex code is white? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ffff
- 39.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
- 40.🌈 In #ae0000 the red part is the hex number ae. What is it as a normal number?
Answer key
- cyan
- #ffff00
- red
- black
- green
- 120
- 181
- yellow
- white
- 3
- #00ff00
- #00ffff
- black
- 255
- blue
- bright green
- blue
- #000000
- bright green
- red
- 201
- 196
- 177
- 127
- 55
- red
- 116
- 58
- #ff0000
- green
- F
- white
- blue
- green
- blue
- 230
- 38
- #ffffff
- 10
- 174
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids