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 is rgb(255, 255, 0)? (a) red (b) bright green (c) yellow (d) magenta
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 3.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) blue (c) white (d) magenta
- 4.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #ffffff (d) #ffff00
- 5.🌈 Which colour is #ff00ff? (a) yellow (b) white (c) magenta (d) bright green
- 6.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
- 7.🌈 Which colour is #00ff00? (a) cyan (b) white (c) bright green (d) black
- 8.🌈 In #030000 the red part is the hex number 03. What is it as a normal number?
- 9.🌈 Which colour is #0000ff? (a) red (b) bright green (c) cyan (d) blue
- 10.🌈 In #001900 the green part is the hex number 19. What is it as a normal number?
- 11.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) yellow (c) black (d) red
- 12.🌈 Which colour of light is strongest in rgb(153, 5, 39)? (a) blue (b) green (c) red
- 13.🌈 Which hex code is bright green? (a) #00ffff (b) #ff0000 (c) #000000 (d) #00ff00
- 14.🌈 Which hex code is magenta? (a) #ffff00 (b) #ff0000 (c) #ff00ff (d) #000000
- 15.🌈 Which hex code is black? (a) #000000 (b) #00ffff (c) #00ff00 (d) #ff00ff
- 16.🌈 Which colour of light is strongest in rgb(44, 204, 83)? (a) green (b) red (c) blue
- 17.🌈 Which colour is #ffff00? (a) blue (b) white (c) bright green (d) yellow
- 18.🌈 Which colour of light is strongest in rgb(245, 119, 27)? (a) red (b) green (c) blue
- 19.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) bright green (c) cyan (d) red
- 20.🌈 Which colour is #ff0000? (a) magenta (b) red (c) blue (d) yellow
- 21.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) bright green (d) white
- 22.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 255 (d) 100
- 23.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) cyan (c) red (d) blue
- 24.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) yellow (d) red
- 25.🌈 Which colour of light is strongest in rgb(54, 225, 87)? (a) blue (b) red (c) green
- 26.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) Z (d) G
- 27.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
- 28.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 29.🌈 In #008100 the green part is the hex number 81. What is it as a normal number?
- 30.🌈 In #00001b the blue part is the hex number 1b. What is it as a normal number?
- 31.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) cyan (c) bright green (d) black
- 32.🌈 Which colour of light is strongest in rgb(63, 178, 128)? (a) red (b) blue (c) green
- 33.🌈 In #0000de the blue part is the hex number de. What is it as a normal number?
- 34.🌈 Which hex code is yellow? (a) #ffffff (b) #ffff00 (c) #00ffff (d) #ff00ff
- 35.🌈 In #00ff00 the green part is the hex number ff. What is it as a normal number?
- 36.🌈 Which colour is #000000? (a) blue (b) white (c) black (d) bright green
- 37.🌈 In #003b00 the green part is the hex number 3b. What is it as a normal number?
- 38.🌈 Which hex code is white? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ffff00
- 39.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #00ff00 (d) #0000ff
- 40.🌈 In #009700 the green part is the hex number 97. What is it as a normal number?
Answer key
- yellow
- red
- magenta
- #0000ff
- magenta
- 92
- bright green
- 3
- blue
- 25
- black
- red
- #00ff00
- #ff00ff
- #000000
- green
- yellow
- red
- cyan
- red
- red
- 255
- blue
- white
- green
- F
- blue
- 3
- 129
- 27
- bright green
- green
- 222
- #ffff00
- 255
- black
- 59
- #ffffff
- #ff0000
- 151
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids