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.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) Z (c) J (d) G
- 2.🌈 Which colour of light is strongest in rgb(85, 42, 204)? (a) green (b) blue (c) red
- 3.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) red (c) green (d) white
- 5.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) red (d) bright green
- 6.🌈 Which hex code is bright green? (a) #ffff00 (b) #ff00ff (c) #00ff00 (d) #ff0000
- 7.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) yellow (c) blue (d) bright green
- 8.🌈 In #a40000 the red part is the hex number a4. What is it as a normal number?
- 9.🌈 Which colour of light is strongest in rgb(71, 170, 89)? (a) blue (b) red (c) green
- 10.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #0000ff (d) #00ff00
- 11.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) cyan (c) white (d) yellow
- 12.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
- 13.🌈 Which colour of light is strongest in rgb(162, 73, 0)? (a) blue (b) green (c) red
- 14.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) yellow (c) cyan (d) black
- 15.🌈 Which colour is #ffffff? (a) yellow (b) white (c) blue (d) red
- 16.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) white
- 17.🌈 Which colour is #00ffff? (a) red (b) cyan (c) white (d) magenta
- 18.🌈 Which colour is #ff0000? (a) white (b) black (c) red (d) yellow
- 19.🌈 Which hex code is red? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #ff0000
- 20.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
- 21.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) bright green (c) yellow (d) cyan
- 22.🌈 Which colour of light is strongest in rgb(49, 181, 73)? (a) blue (b) red (c) green
- 23.🌈 In #007b00 the green part is the hex number 7b. What is it as a normal number?
- 24.🌈 In #eb0000 the red part is the hex number eb. What is it as a normal number?
- 25.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(63, 73, 165)? (a) green (b) blue (c) red
- 27.🌈 Which colour is #ff00ff? (a) white (b) yellow (c) magenta (d) red
- 28.🌈 Which colour of light is strongest in rgb(25, 226, 55)? (a) red (b) blue (c) green
- 29.🌈 Which hex code is magenta? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #ff00ff
- 30.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 31.🌈 Which colour is #0000ff? (a) yellow (b) magenta (c) red (d) blue
- 32.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
- 33.🌈 Which colour of light is strongest in rgb(68, 224, 19)? (a) red (b) blue (c) green
- 34.🌈 In #0000e1 the blue part is the hex number e1. What is it as a normal number?
- 35.🌈 In #00b600 the green part is the hex number b6. What is it as a normal number?
- 36.🌈 In #3f0000 the red part is the hex number 3f. What is it as a normal number?
- 37.🌈 Which hex code is black? (a) #00ffff (b) #0000ff (c) #000000 (d) #ff0000
- 38.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) blue (c) black (d) red
- 39.🌈 Which colour of light is strongest in rgb(2, 101, 184)? (a) green (b) blue (c) red
- 40.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #0000ff
Answer key
- F
- blue
- 255
- blue
- magenta
- #00ff00
- blue
- 164
- green
- #ffff00
- white
- 132
- red
- black
- white
- bright green
- cyan
- red
- #ff0000
- 254
- yellow
- green
- 123
- 235
- 33
- blue
- magenta
- green
- #ff00ff
- 3
- blue
- red
- green
- 225
- 182
- 63
- #000000
- red
- blue
- #0000ff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids