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 #000036 the blue part is the hex number 36. What is it as a normal number?
- 2.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) cyan (d) blue
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 4.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 5.🌈 Which colour is #00ff00? (a) bright green (b) magenta (c) white (d) red
- 6.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) white (c) yellow (d) black
- 7.🌈 In #00e300 the green part is the hex number e3. What is it as a normal number?
- 8.🌈 Which colour is #ffffff? (a) black (b) yellow (c) magenta (d) white
- 9.🌈 Which colour of light is strongest in rgb(121, 251, 65)? (a) blue (b) green (c) red
- 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 11.🌈 Which hex code is bright green? (a) #000000 (b) #ff00ff (c) #ff0000 (d) #00ff00
- 12.🌈 Which hex code is blue? (a) #ffff00 (b) #ffffff (c) #0000ff (d) #00ffff
- 13.🌈 Which hex code is black? (a) #000000 (b) #0000ff (c) #ffff00 (d) #ff00ff
- 14.🌈 In #000018 the blue part is the hex number 18. What is it as a normal number?
- 15.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) cyan (d) blue
- 16.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) bright green (d) red
- 17.🌈 Which hex code is red? (a) #000000 (b) #ff0000 (c) #ffffff (d) #0000ff
- 18.🌈 Which colour of light is strongest in rgb(92, 17, 171)? (a) green (b) red (c) blue
- 19.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) blue (d) magenta
- 20.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(211, 29, 90)? (a) green (b) red (c) blue
- 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 255 (d) 99
- 23.🌈 In #00a800 the green part is the hex number a8. What is it as a normal number?
- 24.🌈 Which hex code is yellow? (a) #000000 (b) #ffff00 (c) #00ffff (d) #ff0000
- 25.🌈 Which hex code is cyan? (a) #000000 (b) #00ff00 (c) #ffffff (d) #00ffff
- 26.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) bright green (c) white (d) black
- 27.🌈 Which colour of light is strongest in rgb(204, 41, 48)? (a) green (b) red (c) blue
- 28.🌈 Which colour of light is strongest in rgb(185, 117, 101)? (a) blue (b) red (c) green
- 29.🌈 In #008f00 the green part is the hex number 8f. What is it as a normal number?
- 30.🌈 Which colour of light is strongest in rgb(151, 129, 67)? (a) green (b) blue (c) red
- 31.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) magenta (b) red (c) cyan (d) blue
- 33.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ff0000
- 34.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) magenta (d) black
- 35.🌈 Which colour of light is strongest in rgb(68, 185, 42)? (a) green (b) red (c) blue
- 36.🌈 Which colour is #ff0000? (a) cyan (b) red (c) blue (d) bright green
- 37.🌈 In #001700 the green part is the hex number 17. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(2, 61, 161)? (a) blue (b) red (c) green
- 39.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) blue (c) black (d) cyan
- 40.🌈 In #000031 the blue part is the hex number 31. What is it as a normal number?
Answer key
- 54
- bright green
- red
- blue
- bright green
- black
- 227
- white
- green
- F
- #00ff00
- #0000ff
- #000000
- 24
- magenta
- magenta
- #ff0000
- blue
- red
- 11
- red
- 255
- 168
- #ffff00
- #00ffff
- white
- red
- red
- 143
- red
- 3
- cyan
- #ff00ff
- cyan
- green
- red
- 23
- blue
- yellow
- 49
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids