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 #00008c the blue part is the hex number 8c. What is it as a normal number?
- 2.🌈 Which colour is #ff00ff? (a) black (b) white (c) magenta (d) cyan
- 3.🌈 Which hex code is red? (a) #ff00ff (b) #0000ff (c) #00ffff (d) #ff0000
- 4.🌈 Which colour of light is strongest in rgb(4, 203, 24)? (a) blue (b) red (c) green
- 5.🌈 Which colour is #00ff00? (a) bright green (b) blue (c) cyan (d) red
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 7.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 8.🌈 Which colour is #ffff00? (a) magenta (b) black (c) red (d) yellow
- 9.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #ff0000 (d) #ff00ff
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) cyan (c) white (d) black
- 11.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) bright green (d) red
- 12.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) red (d) white
- 13.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) white (d) yellow
- 14.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 15.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 16.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) red (d) white
- 17.🌈 Which colour of light is strongest in rgb(230, 116, 22)? (a) red (b) blue (c) green
- 18.🌈 Which colour of light is strongest in rgb(2, 208, 79)? (a) red (b) blue (c) green
- 19.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) cyan (c) white (d) yellow
- 20.🌈 Which colour is #ffffff? (a) yellow (b) black (c) bright green (d) white
- 21.🌈 In #0000f9 the blue part is the hex number f9. What is it as a normal number?
- 22.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ff00 (c) #00ffff (d) #0000ff
- 23.🌈 Which colour of light is strongest in rgb(127, 135, 180)? (a) red (b) blue (c) green
- 24.🌈 In #5a0000 the red part is the hex number 5a. What is it as a normal number?
- 25.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffffff (d) #00ffff
- 26.🌈 In #006d00 the green part is the hex number 6d. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(20, 210, 53)? (a) green (b) blue (c) red
- 28.🌈 Which colour of light is strongest in rgb(95, 7, 165)? (a) green (b) red (c) blue
- 29.🌈 In #007b00 the green part is the hex number 7b. What is it as a normal number?
- 30.🌈 Which hex code is white? (a) #0000ff (b) #00ffff (c) #ffff00 (d) #ffffff
- 31.🌈 In #0000c3 the blue part is the hex number c3. What is it as a normal number?
- 32.🌈 In #0000ad the blue part is the hex number ad. What is it as a normal number?
- 33.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) white (c) yellow (d) cyan
- 34.🌈 Which colour of light is strongest in rgb(4, 176, 64)? (a) blue (b) green (c) red
- 35.🌈 Which colour of light is strongest in rgb(153, 5, 7)? (a) green (b) red (c) blue
- 36.🌈 Which colour of light is strongest in rgb(83, 61, 250)? (a) red (b) blue (c) green
- 37.🌈 In #000061 the blue part is the hex number 61. What is it as a normal number?
- 38.🌈 In #00dc00 the green part is the hex number dc. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(66, 162, 81)? (a) green (b) blue (c) red
- 40.🌈 In #9e0000 the red part is the hex number 9e. What is it as a normal number?
Answer key
- 140
- magenta
- #ff0000
- green
- bright green
- F
- red
- yellow
- #0000ff
- white
- cyan
- cyan
- bright green
- blue
- 255
- red
- red
- green
- blue
- white
- 249
- #00ff00
- blue
- 90
- #ff00ff
- 109
- green
- blue
- 123
- #ffffff
- 195
- 173
- magenta
- green
- red
- blue
- 97
- 220
- green
- 158
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids