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(255, 255, 0)? (a) black (b) white (c) red (d) yellow
- 2.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
- 3.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) black (c) red (d) magenta
- 4.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) yellow (d) red
- 5.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 6.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) white (d) red
- 7.🌈 Which colour is #ff00ff? (a) red (b) magenta (c) white (d) cyan
- 8.🌈 Which hex code is white? (a) #ff0000 (b) #ffffff (c) #00ffff (d) #ffff00
- 9.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #00ffff (d) #ff0000
- 10.🌈 Which colour is #ffffff? (a) black (b) cyan (c) white (d) magenta
- 11.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) cyan (c) red (d) bright green
- 12.🌈 In #000068 the blue part is the hex number 68. What is it as a normal number?
- 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 14.🌈 Which hex code is black? (a) #00ff00 (b) #00ffff (c) #000000 (d) #ff00ff
- 15.🌈 Which colour is #ff0000? (a) white (b) red (c) bright green (d) magenta
- 16.🌈 In #000059 the blue part is the hex number 59. What is it as a normal number?
- 17.🌈 Which hex code is red? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #ffffff
- 18.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) red (c) green (d) black
- 19.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
- 20.🌈 In #c90000 the red part is the hex number c9. What is it as a normal number?
- 21.🌈 Which colour is #0000ff? (a) magenta (b) yellow (c) bright green (d) blue
- 22.🌈 In #850000 the red part is the hex number 85. What is it as a normal number?
- 23.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 24.🌈 In #002b00 the green part is the hex number 2b. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) black (d) yellow
- 26.🌈 Which colour is #ffff00? (a) blue (b) yellow (c) bright green (d) black
- 27.🌈 In #1b0000 the red part is the hex number 1b. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(140, 53, 206)? (a) red (b) blue (c) green
- 29.🌈 Which colour of light is strongest in rgb(200, 115, 124)? (a) red (b) blue (c) green
- 30.🌈 In #006800 the green part is the hex number 68. What is it as a normal number?
- 31.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ffffff
- 32.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) magenta (d) blue
- 33.🌈 Which hex code is bright green? (a) #ff00ff (b) #0000ff (c) #00ff00 (d) #ffffff
- 34.🌈 In #230000 the red part is the hex number 23. What is it as a normal number?
- 35.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(176, 85, 62)? (a) green (b) blue (c) red
- 37.🌈 In #005000 the green part is the hex number 50. What is it as a normal number?
- 38.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(200, 137, 22)? (a) red (b) blue (c) green
- 40.🌈 Which colour of light is strongest in rgb(31, 214, 54)? (a) red (b) blue (c) green
Answer key
- yellow
- 1
- magenta
- white
- 3
- cyan
- magenta
- #ffffff
- #0000ff
- white
- red
- 104
- F
- #000000
- red
- 89
- #ff0000
- red
- 210
- 201
- blue
- 133
- 255
- 43
- bright green
- yellow
- 27
- blue
- red
- 104
- #ffff00
- cyan
- #00ff00
- 35
- 62
- red
- 80
- 42
- red
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids