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 magenta? (a) #000000 (b) #0000ff (c) #ff00ff (d) #00ffff
- 2.🌈 Which colour is #ffffff? (a) white (b) bright green (c) black (d) red
- 3.🌈 Which colour of light is strongest in rgb(246, 11, 88)? (a) green (b) blue (c) red
- 4.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) bright green (c) white (d) blue
- 5.🌈 Which colour is #ff0000? (a) red (b) blue (c) bright green (d) magenta
- 6.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) red (d) cyan
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 8.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?
- 9.🌈 Which hex code is cyan? (a) #0000ff (b) #ffff00 (c) #ffffff (d) #00ffff
- 10.🌈 In #a10000 the red part is the hex number a1. What is it as a normal number?
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 12.🌈 In #000042 the blue part is the hex number 42. What is it as a normal number?
- 13.🌈 Which colour is #00ffff? (a) bright green (b) cyan (c) white (d) yellow
- 14.🌈 Which colour of light is strongest in rgb(220, 1, 38)? (a) blue (b) green (c) red
- 15.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ff00ff
- 16.🌈 Which colour of light is strongest in rgb(133, 243, 34)? (a) blue (b) red (c) green
- 17.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) white (d) bright green
- 18.🌈 Which colour is #000000? (a) black (b) white (c) bright green (d) yellow
- 19.🌈 Which colour of light is strongest in rgb(139, 41, 178)? (a) green (b) blue (c) red
- 20.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 6 (c) 4 (d) 3
- 22.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) black (d) magenta
- 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
- 24.🌈 In #920000 the red part is the hex number 92. What is it as a normal number?
- 25.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) yellow (c) white (d) cyan
- 26.🌈 In #00a800 the green part is the hex number a8. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(155, 31, 52)? (a) green (b) blue (c) red
- 28.🌈 Which hex code is red? (a) #0000ff (b) #000000 (c) #ffffff (d) #ff0000
- 29.🌈 In #001e00 the green part is the hex number 1e. What is it as a normal number?
- 30.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) bright green (c) cyan (d) black
- 31.🌈 In #007500 the green part is the hex number 75. What is it as a normal number?
- 32.🌈 Which colour is #00ff00? (a) blue (b) cyan (c) magenta (d) bright green
- 33.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) yellow (c) black (d) red
- 34.🌈 In #df0000 the red part is the hex number df. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(157, 8, 70)? (a) green (b) red (c) blue
- 36.🌈 Which colour of light is strongest in rgb(150, 39, 75)? (a) red (b) blue (c) green
- 37.🌈 In #030000 the red part is the hex number 03. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(75, 246, 116)? (a) blue (b) green (c) red
- 39.🌈 Which colour of light is strongest in rgb(89, 135, 226)? (a) blue (b) green (c) red
- 40.🌈 Which colour of light is strongest in rgb(185, 120, 106)? (a) green (b) blue (c) red
Answer key
- #ff00ff
- white
- red
- bright green
- red
- black
- red
- 5
- #00ffff
- 161
- blue
- 66
- cyan
- red
- #000000
- green
- red
- black
- blue
- 179
- 3
- blue
- F
- 146
- white
- 168
- red
- #ff0000
- 30
- cyan
- 117
- bright green
- yellow
- 223
- red
- red
- 3
- green
- blue
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids