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 first two digits give? (a) red (b) green (c) blue (d) black
- 2.🌈 Which colour is #ffff00? (a) white (b) yellow (c) red (d) bright green
- 3.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) blue (c) yellow (d) red
- 4.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 5.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) bright green (c) magenta (d) white
- 6.🌈 In #3a0000 the red part is the hex number 3a. What is it as a normal number?
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 8.🌈 Which hex code is cyan? (a) #ffffff (b) #00ffff (c) #0000ff (d) #ff00ff
- 9.🌈 In #0000ac the blue part is the hex number ac. What is it as a normal number?
- 10.🌈 Which colour is #000000? (a) cyan (b) black (c) bright green (d) white
- 11.🌈 In #0000a4 the blue part is the hex number a4. What is it as a normal number?
- 12.🌈 Which hex code is blue? (a) #ff0000 (b) #0000ff (c) #ff00ff (d) #00ff00
- 13.🌈 In #0000a6 the blue part is the hex number a6. What is it as a normal number?
- 14.🌈 Which colour is #00ff00? (a) yellow (b) black (c) magenta (d) bright green
- 15.🌈 In #7e0000 the red part is the hex number 7e. What is it as a normal number?
- 16.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
- 17.🌈 Which colour of light is strongest in rgb(64, 104, 206)? (a) green (b) red (c) blue
- 18.🌈 Which colour of light is strongest in rgb(168, 79, 20)? (a) blue (b) red (c) green
- 19.🌈 Which colour is #ffffff? (a) red (b) cyan (c) white (d) bright green
- 20.🌈 Which colour of light is strongest in rgb(88, 136, 193)? (a) green (b) blue (c) red
- 21.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 22.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ffff00 (d) #0000ff
- 23.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) magenta (c) cyan (d) red
- 24.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) yellow (d) white
- 25.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #0000ff (d) #ffff00
- 26.🌈 Which colour of light is strongest in rgb(250, 11, 32)? (a) green (b) red (c) blue
- 27.🌈 Which colour of light is strongest in rgb(52, 236, 75)? (a) red (b) blue (c) green
- 28.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) bright green (c) white (d) blue
- 29.🌈 Which colour of light is strongest in rgb(3, 202, 1)? (a) red (b) green (c) blue
- 30.🌈 Which hex code is red? (a) #ffff00 (b) #ff00ff (c) #000000 (d) #ff0000
- 31.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #000000 (d) #ff0000
- 32.🌈 Which colour is #0000ff? (a) white (b) bright green (c) magenta (d) blue
- 33.🌈 Which colour is #00ffff? (a) white (b) bright green (c) cyan (d) blue
- 34.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(132, 55, 174)? (a) blue (b) red (c) green
- 36.🌈 Which colour of light is strongest in rgb(253, 25, 140)? (a) blue (b) green (c) red
- 37.🌈 In #dc0000 the red part is the hex number dc. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(39, 200, 57)? (a) green (b) red (c) blue
- 39.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
- 40.🌈 In #a20000 the red part is the hex number a2. What is it as a normal number?
Answer key
- red
- yellow
- yellow
- 255
- black
- 58
- F
- #00ffff
- 172
- black
- 164
- #0000ff
- 166
- bright green
- 126
- blue
- blue
- red
- white
- blue
- 3
- #00ff00
- cyan
- bright green
- #ffff00
- red
- green
- blue
- green
- #ff0000
- #ff00ff
- blue
- cyan
- 26
- blue
- red
- 220
- green
- 39
- 162
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids