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 #4e0000 the red part is the hex number 4e. What is it as a normal number?
- 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 3.🌈 Which hex code is magenta? (a) #0000ff (b) #ff00ff (c) #00ff00 (d) #ffff00
- 4.🌈 Which colour is #ff0000? (a) magenta (b) blue (c) bright green (d) red
- 5.🌈 Which colour of light is strongest in rgb(232, 25, 2)? (a) blue (b) red (c) green
- 6.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
- 7.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 8.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) white (d) red
- 10.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) yellow (c) bright green (d) cyan
- 11.🌈 In #00ad00 the green part is the hex number ad. What is it as a normal number?
- 12.🌈 Which colour is rgb(0, 0, 0)? (a) magenta (b) white (c) black (d) red
- 13.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) black (d) cyan
- 14.🌈 Which colour is #00ffff? (a) blue (b) cyan (c) yellow (d) black
- 15.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #ff00ff (d) #00ff00
- 16.🌈 Which colour of light is strongest in rgb(7, 153, 100)? (a) red (b) green (c) blue
- 17.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) red (c) magenta (d) yellow
- 18.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) blue (c) white (d) yellow
- 19.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
- 20.🌈 In #004600 the green part is the hex number 46. What is it as a normal number?
- 21.🌈 In #4d0000 the red part is the hex number 4d. What is it as a normal number?
- 22.🌈 Which hex code is yellow? (a) #ffffff (b) #00ffff (c) #00ff00 (d) #ffff00
- 23.🌈 Which colour of light is strongest in rgb(73, 182, 15)? (a) green (b) blue (c) red
- 24.🌈 Which colour is #000000? (a) white (b) cyan (c) black (d) magenta
- 25.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 26.🌈 Which hex code is blue? (a) #ff0000 (b) #0000ff (c) #ffffff (d) #00ffff
- 27.🌈 In #00001a the blue part is the hex number 1a. What is it as a normal number?
- 28.🌈 In #00dd00 the green part is the hex number dd. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(125, 70, 241)? (a) blue (b) red (c) green
- 30.🌈 In #00000d the blue part is the hex number 0d. What is it as a normal number?
- 31.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) black (d) magenta
- 32.🌈 Which colour of light is strongest in rgb(124, 106, 167)? (a) red (b) green (c) blue
- 33.🌈 Which colour is #0000ff? (a) magenta (b) cyan (c) yellow (d) blue
- 34.🌈 Which colour of light is strongest in rgb(46, 212, 67)? (a) red (b) blue (c) green
- 35.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) bright green (c) blue (d) red
- 36.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) bright green (d) blue
- 37.🌈 In #0000a2 the blue part is the hex number a2. What is it as a normal number?
- 38.🌈 In #0000e7 the blue part is the hex number e7. What is it as a normal number?
- 39.🌈 Which hex code is bright green? (a) #ffffff (b) #ff00ff (c) #00ff00 (d) #ffff00
- 40.🌈 In #0000da the blue part is the hex number da. What is it as a normal number?
Answer key
- 78
- 3
- #ff00ff
- red
- red
- 213
- 255
- 19
- blue
- cyan
- 173
- black
- yellow
- cyan
- #00ffff
- green
- magenta
- white
- F
- 70
- 77
- #ffff00
- green
- black
- red
- #0000ff
- 26
- 221
- blue
- 13
- bright green
- blue
- blue
- green
- red
- magenta
- 162
- 231
- #00ff00
- 218
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids