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 hex code is black? (a) #ff0000 (b) #0000ff (c) #000000 (d) #ffffff
- 2.🌈 In #8e0000 the red part is the hex number 8e. What is it as a normal number?
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
- 4.🌈 Which colour is #ff00ff? (a) cyan (b) blue (c) magenta (d) bright green
- 5.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) red (d) yellow
- 6.🌈 Which colour of light is strongest in rgb(68, 197, 133)? (a) red (b) blue (c) green
- 7.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 9.🌈 Which colour is #00ff00? (a) bright green (b) red (c) white (d) blue
- 10.🌈 Which colour of light is strongest in rgb(239, 122, 113)? (a) blue (b) green (c) red
- 11.🌈 Which hex code is red? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ff0000
- 12.🌈 Which colour of light is strongest in rgb(227, 99, 87)? (a) red (b) green (c) blue
- 13.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) blue (d) white
- 14.🌈 Which colour of light is strongest in rgb(99, 184, 0)? (a) green (b) red (c) blue
- 15.🌈 Which hex code is bright green? (a) #ffff00 (b) #ffffff (c) #ff00ff (d) #00ff00
- 16.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 255 (c) 100 (d) 1000
- 17.🌈 Which colour is #000000? (a) red (b) bright green (c) black (d) blue
- 18.🌈 Which colour is #00ffff? (a) magenta (b) cyan (c) black (d) bright green
- 19.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) magenta (d) blue
- 20.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) cyan (c) white (d) red
- 21.🌈 Which colour of light is strongest in rgb(189, 101, 113)? (a) green (b) red (c) blue
- 22.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
- 23.🌈 In #6e0000 the red part is the hex number 6e. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(211, 100, 136)? (a) green (b) red (c) blue
- 25.🌈 In #000036 the blue part is the hex number 36. What is it as a normal number?
- 26.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
- 27.🌈 In #00fe00 the green part is the hex number fe. What is it as a normal number?
- 28.🌈 Which colour is rgb(255, 255, 0)? (a) red (b) white (c) magenta (d) yellow
- 29.🌈 Which hex code is magenta? (a) #ff0000 (b) #ffffff (c) #ff00ff (d) #0000ff
- 30.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) magenta (c) black (d) bright green
- 31.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) red (d) black
- 32.🌈 Which colour of light is strongest in rgb(173, 30, 136)? (a) blue (b) red (c) green
- 33.🌈 Which colour of light is strongest in rgb(248, 32, 132)? (a) blue (b) green (c) red
- 34.🌈 In #004600 the green part is the hex number 46. What is it as a normal number?
- 35.🌈 Which hex code is yellow? (a) #00ffff (b) #ffff00 (c) #ff0000 (d) #00ff00
- 36.🌈 Which colour is #ffffff? (a) cyan (b) bright green (c) white (d) blue
- 37.🌈 Which hex code is cyan? (a) #0000ff (b) #00ffff (c) #ffffff (d) #ff0000
- 38.🌈 In #000058 the blue part is the hex number 58. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(170, 46, 123)? (a) red (b) blue (c) green
- 40.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) magenta (c) black (d) yellow
Answer key
- #000000
- 142
- red
- magenta
- red
- green
- 241
- 3
- bright green
- red
- #ff0000
- red
- yellow
- green
- #00ff00
- 255
- black
- cyan
- black
- white
- red
- F
- 110
- red
- 54
- blue
- 254
- yellow
- #ff00ff
- bright green
- magenta
- red
- red
- 70
- #ffff00
- white
- #00ffff
- 88
- red
- red
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids