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 #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 2.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ffffff (d) #ff0000
- 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) black (c) bright green (d) magenta
- 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
- 5.🌈 Which colour of light is strongest in rgb(44, 241, 93)? (a) red (b) green (c) blue
- 6.🌈 Which colour is #00ff00? (a) magenta (b) red (c) blue (d) bright green
- 7.🌈 Which colour of light is strongest in rgb(35, 167, 64)? (a) blue (b) red (c) green
- 8.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
- 9.🌈 Which hex code is yellow? (a) #ffff00 (b) #000000 (c) #ff0000 (d) #ff00ff
- 10.🌈 Which colour of light is strongest in rgb(55, 186, 8)? (a) red (b) green (c) blue
- 11.🌈 In #ac0000 the red part is the hex number ac. What is it as a normal number?
- 12.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) red (c) bright green (d) black
- 13.🌈 Which colour of light is strongest in rgb(183, 18, 122)? (a) green (b) blue (c) red
- 14.🌈 Which colour is #ffff00? (a) bright green (b) red (c) magenta (d) yellow
- 15.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 1000 (c) 100 (d) 255
- 16.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) blue (c) black (d) white
- 17.🌈 Which colour is #00ffff? (a) yellow (b) red (c) blue (d) cyan
- 18.🌈 Which colour is #ff00ff? (a) bright green (b) cyan (c) magenta (d) white
- 19.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #000000 (d) #ffffff
- 20.🌈 Which colour is #0000ff? (a) white (b) cyan (c) bright green (d) blue
- 21.🌈 Which hex code is blue? (a) #0000ff (b) #ff0000 (c) #ffff00 (d) #00ff00
- 22.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 2 (d) 6
- 23.🌈 Which colour of light is strongest in rgb(176, 134, 126)? (a) green (b) blue (c) red
- 24.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(10, 21, 159)? (a) blue (b) red (c) green
- 26.🌈 In #000091 the blue part is the hex number 91. What is it as a normal number?
- 27.🌈 Which hex code is black? (a) #0000ff (b) #ffffff (c) #000000 (d) #00ff00
- 28.🌈 Which colour is #ffffff? (a) red (b) blue (c) white (d) cyan
- 29.🌈 Which colour of light is strongest in rgb(153, 127, 110)? (a) blue (b) green (c) red
- 30.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) red (c) white (d) cyan
- 31.🌈 In #db0000 the red part is the hex number db. What is it as a normal number?
- 32.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) black (c) blue (d) magenta
- 33.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) white (c) red (d) yellow
- 34.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) magenta (c) white (d) yellow
- 35.🌈 In #006a00 the green part is the hex number 6a. What is it as a normal number?
- 36.🌈 Which hex code is magenta? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #ffffff
- 37.🌈 Which colour of light is strongest in rgb(244, 26, 80)? (a) green (b) red (c) blue
- 38.🌈 In #002d00 the green part is the hex number 2d. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(56, 215, 124)? (a) blue (b) red (c) green
- 40.🌈 In #0000dd the blue part is the hex number dd. What is it as a normal number?
Answer key
- red
- #00ff00
- blue
- F
- green
- bright green
- green
- blue
- #ffff00
- green
- 172
- red
- red
- yellow
- 255
- cyan
- cyan
- magenta
- #ff0000
- blue
- #0000ff
- 3
- red
- 26
- blue
- 145
- #000000
- white
- red
- magenta
- 219
- black
- yellow
- bright green
- 106
- #ff00ff
- red
- 45
- green
- 221
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids