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 #0000ff? (a) black (b) magenta (c) white (d) blue
- 2.🌈 Which hex code is magenta? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #000000
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) bright green (d) blue
- 4.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) magenta (c) red (d) yellow
- 5.🌈 In #510000 the red part is the hex number 51. What is it as a normal number?
- 6.🌈 Which colour of light is strongest in rgb(185, 33, 14)? (a) red (b) blue (c) green
- 7.🌈 Which colour of light is strongest in rgb(44, 64, 222)? (a) blue (b) green (c) red
- 8.🌈 Which hex code is blue? (a) #ffffff (b) #00ffff (c) #0000ff (d) #ffff00
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
- 10.🌈 In #000040 the blue part is the hex number 40. What is it as a normal number?
- 11.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) cyan (c) magenta (d) white
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
- 13.🌈 Which hex code is cyan? (a) #000000 (b) #ffff00 (c) #0000ff (d) #00ffff
- 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
- 15.🌈 Which hex code is red? (a) #ff0000 (b) #0000ff (c) #00ff00 (d) #000000
- 16.🌈 Which colour is #ff00ff? (a) magenta (b) white (c) black (d) cyan
- 17.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 18.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) red (c) bright green (d) black
- 19.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) magenta (c) bright green (d) cyan
- 20.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) blue (c) yellow (d) bright green
- 21.🌈 In #0000e8 the blue part is the hex number e8. What is it as a normal number?
- 22.🌈 In #930000 the red part is the hex number 93. What is it as a normal number?
- 23.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(40, 45, 198)? (a) blue (b) red (c) green
- 25.🌈 Which colour of light is strongest in rgb(53, 181, 39)? (a) red (b) blue (c) green
- 26.🌈 Which colour is #00ff00? (a) cyan (b) white (c) black (d) bright green
- 27.🌈 In #d90000 the red part is the hex number d9. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(221, 14, 48)? (a) red (b) green (c) blue
- 29.🌈 Which colour is #ff0000? (a) cyan (b) red (c) bright green (d) yellow
- 30.🌈 Which colour is #ffff00? (a) blue (b) white (c) cyan (d) yellow
- 31.🌈 Which colour of light is strongest in rgb(6, 204, 117)? (a) red (b) blue (c) green
- 32.🌈 Which hex code is white? (a) #00ffff (b) #0000ff (c) #ffffff (d) #000000
- 33.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
- 34.🌈 In #000045 the blue part is the hex number 45. What is it as a normal number?
- 35.🌈 Which hex code is black? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #000000
- 36.🌈 Which colour of light is strongest in rgb(126, 201, 26)? (a) blue (b) green (c) red
- 37.🌈 Which colour is #000000? (a) bright green (b) cyan (c) black (d) magenta
- 38.🌈 Which colour of light is strongest in rgb(75, 127, 239)? (a) red (b) blue (c) green
- 39.🌈 Which colour of light is strongest in rgb(91, 223, 102)? (a) blue (b) green (c) red
- 40.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?
Answer key
- blue
- #ff00ff
- cyan
- yellow
- 81
- red
- blue
- #0000ff
- blue
- 64
- magenta
- F
- #00ffff
- 3
- #ff0000
- magenta
- 255
- red
- bright green
- blue
- 232
- 147
- 156
- blue
- green
- bright green
- 217
- red
- red
- yellow
- green
- #ffffff
- 195
- 69
- #000000
- green
- black
- blue
- green
- 5
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids