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 of light is strongest in rgb(7, 126, 154)? (a) green (b) blue (c) red
- 2.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 3.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) white (d) magenta
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 5.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 1000 (d) 255
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
- 7.🌈 Which colour is #ff00ff? (a) black (b) blue (c) magenta (d) bright green
- 8.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) white (d) red
- 9.🌈 Which colour is #ffff00? (a) white (b) black (c) yellow (d) blue
- 10.🌈 In #00007c the blue part is the hex number 7c. What is it as a normal number?
- 11.🌈 In #790000 the red part is the hex number 79. What is it as a normal number?
- 12.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) black (c) bright green (d) blue
- 13.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) white (c) magenta (d) red
- 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
- 15.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) cyan (c) red (d) magenta
- 16.🌈 Which colour is #000000? (a) bright green (b) yellow (c) cyan (d) black
- 17.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
- 18.🌈 In #008600 the green part is the hex number 86. What is it as a normal number?
- 19.🌈 Which colour of light is strongest in rgb(53, 252, 10)? (a) green (b) red (c) blue
- 20.🌈 Which hex code is black? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ff00ff
- 21.🌈 Which colour is #ff0000? (a) magenta (b) black (c) red (d) bright green
- 22.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #ff0000
- 23.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) magenta (c) white (d) yellow
- 24.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #000000 (d) #00ff00
- 25.🌈 Which colour is #00ffff? (a) red (b) cyan (c) white (d) bright green
- 26.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) blue (c) black (d) bright green
- 27.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(31, 188, 97)? (a) red (b) blue (c) green
- 29.🌈 In #004100 the green part is the hex number 41. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(126, 176, 10)? (a) blue (b) green (c) red
- 31.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) white (c) blue (d) black
- 32.🌈 In #008400 the green part is the hex number 84. What is it as a normal number?
- 33.🌈 Which hex code is bright green? (a) #ff0000 (b) #00ff00 (c) #ffff00 (d) #0000ff
- 34.🌈 Which hex code is cyan? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #00ffff
- 35.🌈 Which colour is #ffffff? (a) black (b) white (c) blue (d) red
- 36.🌈 Which colour of light is strongest in rgb(245, 58, 140)? (a) green (b) red (c) blue
- 37.🌈 Which colour is #00ff00? (a) yellow (b) red (c) bright green (d) white
- 38.🌈 Which colour of light is strongest in rgb(115, 64, 240)? (a) red (b) green (c) blue
- 39.🌈 Which colour of light is strongest in rgb(2, 174, 113)? (a) blue (b) green (c) red
- 40.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
Answer key
- blue
- blue
- black
- red
- 255
- 3
- magenta
- cyan
- yellow
- 124
- 121
- bright green
- red
- F
- magenta
- black
- 112
- 134
- green
- #000000
- red
- #0000ff
- yellow
- #ffffff
- cyan
- blue
- 27
- green
- 65
- green
- white
- 132
- #00ff00
- #00ffff
- white
- red
- bright green
- blue
- green
- 160
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids