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) red (c) white (d) blue
- 2.🌈 In #00004c the blue part is the hex number 4c. What is it as a normal number?
- 3.🌈 Which colour is #000000? (a) black (b) yellow (c) red (d) magenta
- 4.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) blue (d) black
- 5.🌈 In #00005b the blue part is the hex number 5b. What is it as a normal number?
- 6.🌈 In #1e0000 the red part is the hex number 1e. What is it as a normal number?
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
- 8.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) red (d) yellow
- 9.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) cyan (d) red
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) blue (d) red
- 11.🌈 Which colour is rgb(255, 0, 0)? (a) white (b) cyan (c) red (d) bright green
- 12.🌈 Which hex code is yellow? (a) #0000ff (b) #00ffff (c) #ffffff (d) #ffff00
- 13.🌈 Which colour of light is strongest in rgb(31, 133, 175)? (a) blue (b) green (c) red
- 14.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) magenta (d) bright green
- 15.🌈 In #d50000 the red part is the hex number d5. What is it as a normal number?
- 16.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 17.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) blue (d) red
- 18.🌈 Which colour is #ffff00? (a) black (b) white (c) yellow (d) cyan
- 19.🌈 Which colour is #ff0000? (a) red (b) bright green (c) magenta (d) blue
- 20.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 21.🌈 Which colour of light is strongest in rgb(79, 180, 16)? (a) blue (b) green (c) red
- 22.🌈 In #00c300 the green part is the hex number c3. What is it as a normal number?
- 23.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 24.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) red (d) cyan
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) magenta (d) red
- 26.🌈 Which colour of light is strongest in rgb(85, 252, 104)? (a) blue (b) red (c) green
- 27.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) white (c) yellow (d) bright green
- 28.🌈 In #002200 the green part is the hex number 22. What is it as a normal number?
- 29.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) white (d) red
- 30.🌈 Which colour is #0000ff? (a) white (b) magenta (c) blue (d) black
- 31.🌈 In #001100 the green part is the hex number 11. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(132, 154, 54)? (a) green (b) red (c) blue
- 33.🌈 Which colour is #ffffff? (a) red (b) yellow (c) white (d) bright green
- 34.🌈 In #9c0000 the red part is the hex number 9c. What is it as a normal number?
- 35.🌈 In #00005d the blue part is the hex number 5d. What is it as a normal number?
- 36.🌈 In #8f0000 the red part is the hex number 8f. What is it as a normal number?
- 37.🌈 Which hex code is bright green? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #00ff00
- 38.🌈 In #00004f the blue part is the hex number 4f. What is it as a normal number?
- 39.🌈 Which hex code is red? (a) #ffffff (b) #ff00ff (c) #00ffff (d) #ff0000
- 40.🌈 Which colour of light is strongest in rgb(171, 22, 8)? (a) blue (b) red (c) green
Answer key
- blue
- 76
- black
- bright green
- 91
- 30
- F
- blue
- magenta
- white
- red
- #ffff00
- blue
- bright green
- 213
- red
- magenta
- yellow
- red
- 3
- green
- 195
- 255
- cyan
- black
- green
- yellow
- 34
- cyan
- blue
- 17
- green
- white
- 156
- 93
- 143
- #00ff00
- 79
- #ff0000
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids