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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 2.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) bright green (c) blue (d) magenta
- 3.🌈 Which colour is #0000ff? (a) yellow (b) white (c) red (d) blue
- 4.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 5.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) blue (c) cyan (d) red
- 6.🌈 In #000038 the blue part is the hex number 38. What is it as a normal number?
- 7.🌈 Which colour of light is strongest in rgb(36, 4, 230)? (a) green (b) red (c) blue
- 8.🌈 Which hex code is magenta? (a) #00ff00 (b) #ffff00 (c) #ff00ff (d) #ff0000
- 9.🌈 Which colour of light is strongest in rgb(177, 8, 135)? (a) blue (b) green (c) red
- 10.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) magenta (c) white (d) bright green
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
- 12.🌈 Which colour is #00ffff? (a) cyan (b) magenta (c) white (d) red
- 13.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 14.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
- 15.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) black (c) magenta (d) white
- 16.🌈 In #003900 the green part is the hex number 39. What is it as a normal number?
- 17.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
- 18.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #ff0000 (d) #ffffff
- 19.🌈 Which hex code is blue? (a) #ffffff (b) #000000 (c) #0000ff (d) #ffff00
- 20.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) blue (c) yellow (d) white
- 21.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
- 22.🌈 Which colour is #000000? (a) black (b) yellow (c) white (d) cyan
- 23.🌈 Which colour of light is strongest in rgb(166, 140, 65)? (a) red (b) blue (c) green
- 24.🌈 Which colour of light is strongest in rgb(177, 102, 65)? (a) green (b) red (c) blue
- 25.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) bright green (c) blue (d) cyan
- 26.🌈 Which hex code is white? (a) #ff0000 (b) #0000ff (c) #ffffff (d) #00ff00
- 27.🌈 Which colour is #ff00ff? (a) black (b) red (c) bright green (d) magenta
- 28.🌈 Which colour of light is strongest in rgb(174, 80, 127)? (a) green (b) red (c) blue
- 29.🌈 In #000092 the blue part is the hex number 92. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(185, 133, 139)? (a) blue (b) red (c) green
- 31.🌈 Which colour of light is strongest in rgb(3, 128, 199)? (a) red (b) green (c) blue
- 32.🌈 Which colour is #00ff00? (a) yellow (b) red (c) blue (d) bright green
- 33.🌈 Which colour of light is strongest in rgb(153, 134, 138)? (a) green (b) red (c) blue
- 34.🌈 Which colour of light is strongest in rgb(252, 53, 38)? (a) green (b) blue (c) red
- 35.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
- 36.🌈 In #00003b the blue part is the hex number 3b. What is it as a normal number?
- 37.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(112, 32, 187)? (a) green (b) red (c) blue
- 39.🌈 In #840000 the red part is the hex number 84. What is it as a normal number?
- 40.🌈 In #00000a the blue part is the hex number 0a. What is it as a normal number?
Answer key
- 3
- blue
- blue
- 255
- red
- 56
- blue
- #ff00ff
- red
- bright green
- blue
- cyan
- red
- 16
- white
- 57
- F
- #ffff00
- #0000ff
- yellow
- 129
- black
- red
- red
- cyan
- #ffffff
- magenta
- red
- 146
- red
- blue
- bright green
- red
- red
- 178
- 59
- 11
- blue
- 132
- 10
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids