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.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) white (c) blue (d) red
- 2.🌈 Which colour is #00ff00? (a) white (b) blue (c) red (d) bright green
- 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 4.🌈 Which colour is #ffffff? (a) bright green (b) magenta (c) cyan (d) white
- 5.🌈 Which colour is #0000ff? (a) red (b) cyan (c) blue (d) white
- 6.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) yellow (d) black
- 7.🌈 Which colour of light is strongest in rgb(91, 158, 65)? (a) green (b) red (c) blue
- 8.🌈 In #00007a the blue part is the hex number 7a. What is it as a normal number?
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 3 (d) 2
- 10.🌈 Which colour of light is strongest in rgb(193, 23, 69)? (a) green (b) blue (c) red
- 11.🌈 Which colour of light is strongest in rgb(156, 105, 49)? (a) blue (b) green (c) red
- 12.🌈 Which colour of light is strongest in rgb(97, 173, 11)? (a) blue (b) red (c) green
- 13.🌈 Which colour is #ff0000? (a) white (b) red (c) blue (d) magenta
- 14.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) cyan (d) blue
- 15.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
- 16.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
- 17.🌈 Which hex code is white? (a) #00ffff (b) #ff00ff (c) #ffff00 (d) #ffffff
- 18.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 19.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) black (d) magenta
- 20.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) white (c) magenta (d) bright green
- 21.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) bright green (c) yellow (d) blue
- 22.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #00ff00 (d) #ff0000
- 23.🌈 In #0000a9 the blue part is the hex number a9. What is it as a normal number?
- 24.🌈 In #000040 the blue part is the hex number 40. What is it as a normal number?
- 25.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 1000 (d) 99
- 26.🌈 In #000082 the blue part is the hex number 82. What is it as a normal number?
- 27.🌈 In #7b0000 the red part is the hex number 7b. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(127, 179, 30)? (a) blue (b) green (c) red
- 29.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) white (d) magenta
- 30.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
- 31.🌈 Which colour is #000000? (a) yellow (b) black (c) white (d) blue
- 32.🌈 In #001d00 the green part is the hex number 1d. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(63, 56, 221)? (a) red (b) blue (c) green
- 34.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) yellow (c) white (d) cyan
- 35.🌈 Which colour of light is strongest in rgb(161, 22, 94)? (a) green (b) blue (c) red
- 36.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) bright green (c) yellow (d) blue
- 37.🌈 Which colour of light is strongest in rgb(57, 189, 0)? (a) blue (b) green (c) red
- 38.🌈 In #00da00 the green part is the hex number da. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(71, 84, 152)? (a) green (b) blue (c) red
- 40.🌈 In #00a600 the green part is the hex number a6. What is it as a normal number?
Answer key
- blue
- bright green
- F
- white
- blue
- bright green
- green
- 122
- 3
- red
- red
- green
- red
- red
- 66
- 202
- #ffffff
- red
- black
- magenta
- blue
- #ff0000
- 169
- 64
- 255
- 130
- 123
- green
- cyan
- 195
- black
- 29
- blue
- white
- red
- yellow
- green
- 218
- blue
- 166
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids