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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 3 (d) 6
- 2.🌈 Which colour is #00ff00? (a) black (b) cyan (c) bright green (d) blue
- 3.🌈 Which colour of light is strongest in rgb(128, 233, 15)? (a) red (b) green (c) blue
- 4.🌈 Which colour is #ff00ff? (a) magenta (b) black (c) bright green (d) cyan
- 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 6.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) black (c) bright green (d) white
- 7.🌈 In #630000 the red part is the hex number 63. What is it as a normal number?
- 8.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) black (c) cyan (d) magenta
- 9.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
- 10.🌈 In #000032 the blue part is the hex number 32. What is it as a normal number?
- 11.🌈 Which colour of light is strongest in rgb(31, 182, 85)? (a) blue (b) red (c) green
- 12.🌈 Which colour is #000000? (a) magenta (b) black (c) red (d) bright green
- 13.🌈 Which hex code is red? (a) #00ffff (b) #ff00ff (c) #00ff00 (d) #ff0000
- 14.🌈 Which hex code is blue? (a) #0000ff (b) #00ff00 (c) #000000 (d) #ffff00
- 15.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) red (d) black
- 16.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) red (c) blue (d) yellow
- 17.🌈 In #009600 the green part is the hex number 96. What is it as a normal number?
- 18.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) white (c) black (d) blue
- 19.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
- 20.🌈 Which colour of light is strongest in rgb(251, 16, 48)? (a) red (b) blue (c) green
- 21.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
- 22.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) yellow (d) black
- 23.🌈 Which colour is #ffff00? (a) bright green (b) yellow (c) cyan (d) blue
- 24.🌈 Which colour of light is strongest in rgb(253, 5, 9)? (a) blue (b) red (c) green
- 25.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) bright green (c) blue (d) white
- 26.🌈 Which colour is #ff0000? (a) white (b) red (c) black (d) bright green
- 27.🌈 Which colour of light is strongest in rgb(194, 0, 107)? (a) green (b) blue (c) red
- 28.🌈 Which colour of light is strongest in rgb(75, 218, 74)? (a) red (b) green (c) blue
- 29.🌈 Which colour of light is strongest in rgb(226, 6, 15)? (a) blue (b) green (c) red
- 30.🌈 Which hex code is bright green? (a) #ffffff (b) #0000ff (c) #ff00ff (d) #00ff00
- 31.🌈 In #0000a5 the blue part is the hex number a5. What is it as a normal number?
- 32.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) black (c) blue (d) bright green
- 33.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 34.🌈 In #390000 the red part is the hex number 39. What is it as a normal number?
- 35.🌈 In #000038 the blue part is the hex number 38. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(59, 102, 225)? (a) red (b) blue (c) green
- 37.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ff00ff (d) #00ff00
- 38.🌈 Which colour of light is strongest in rgb(84, 217, 137)? (a) blue (b) green (c) red
- 39.🌈 In #00007b the blue part is the hex number 7b. What is it as a normal number?
- 40.🌈 Which hex code is yellow? (a) #ffff00 (b) #0000ff (c) #ff0000 (d) #000000
Answer key
- 3
- bright green
- green
- magenta
- F
- bright green
- 99
- magenta
- 255
- 50
- green
- black
- #ff0000
- #0000ff
- red
- yellow
- 150
- black
- 78
- red
- 180
- blue
- yellow
- red
- white
- red
- red
- green
- red
- #00ff00
- 165
- blue
- blue
- 57
- 56
- blue
- #000000
- green
- 123
- #ffff00
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids