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) blue (c) black (d) green
- 2.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) white (d) bright green
- 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 4.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) black (c) magenta (d) yellow
- 5.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 6.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
- 7.🌈 Which colour is #00ff00? (a) yellow (b) bright green (c) cyan (d) blue
- 8.🌈 Which colour of light is strongest in rgb(57, 221, 26)? (a) red (b) blue (c) green
- 9.🌈 Which colour is #ff00ff? (a) bright green (b) red (c) white (d) magenta
- 10.🌈 Which colour is #ffff00? (a) red (b) yellow (c) bright green (d) blue
- 11.🌈 Which colour of light is strongest in rgb(35, 92, 179)? (a) green (b) red (c) blue
- 12.🌈 Which colour is #00ffff? (a) bright green (b) yellow (c) cyan (d) white
- 13.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) yellow (c) red (d) bright green
- 14.🌈 Which colour of light is strongest in rgb(0, 210, 12)? (a) blue (b) red (c) green
- 15.🌈 Which colour is #ff0000? (a) black (b) bright green (c) white (d) red
- 16.🌈 In #00004a the blue part is the hex number 4a. What is it as a normal number?
- 17.🌈 Which colour of light is strongest in rgb(6, 55, 255)? (a) blue (b) green (c) red
- 18.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) red (c) bright green (d) blue
- 19.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 6 (d) 4
- 20.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #ffffff (d) #00ffff
- 21.🌈 Which colour of light is strongest in rgb(225, 42, 132)? (a) red (b) blue (c) green
- 22.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #000000 (d) #0000ff
- 23.🌈 Which hex code is black? (a) #0000ff (b) #000000 (c) #00ff00 (d) #ffffff
- 24.🌈 Which colour of light is strongest in rgb(203, 55, 54)? (a) green (b) red (c) blue
- 25.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) red (c) black (d) yellow
- 26.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) bright green (c) black (d) blue
- 27.🌈 Which colour of light is strongest in rgb(243, 38, 23)? (a) red (b) green (c) blue
- 28.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
- 29.🌈 Which colour is #0000ff? (a) red (b) magenta (c) cyan (d) blue
- 30.🌈 Which colour of light is strongest in rgb(169, 8, 64)? (a) red (b) green (c) blue
- 31.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) white (c) bright green (d) magenta
- 32.🌈 Which colour of light is strongest in rgb(161, 71, 125)? (a) red (b) blue (c) green
- 33.🌈 Which colour of light is strongest in rgb(188, 9, 57)? (a) red (b) blue (c) green
- 34.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #00ffff (d) #0000ff
- 35.🌈 Which colour of light is strongest in rgb(24, 114, 170)? (a) red (b) blue (c) green
- 36.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?
- 37.🌈 In #0000ca the blue part is the hex number ca. What is it as a normal number?
- 38.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #0000ff (d) #ff0000
- 39.🌈 Which colour of light is strongest in rgb(98, 2, 160)? (a) red (b) blue (c) green
- 40.🌈 Which colour of light is strongest in rgb(0, 37, 248)? (a) red (b) blue (c) green
Answer key
- red
- white
- F
- magenta
- 255
- 39
- bright green
- green
- magenta
- yellow
- blue
- cyan
- red
- green
- red
- 74
- blue
- blue
- 3
- #00ffff
- red
- #0000ff
- #000000
- red
- yellow
- black
- red
- blue
- blue
- red
- bright green
- red
- red
- #ff00ff
- blue
- 63
- 202
- #ffff00
- blue
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids