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 colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) blue (d) white
- 2.🌈 Which colour is #00ff00? (a) cyan (b) bright green (c) red (d) blue
- 3.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
- 4.🌈 Which colour is #ff0000? (a) red (b) magenta (c) bright green (d) white
- 5.🌈 Which colour is #ffffff? (a) black (b) bright green (c) white (d) blue
- 6.🌈 Which hex code is blue? (a) #ff00ff (b) #00ffff (c) #ffffff (d) #0000ff
- 7.🌈 Which hex code is red? (a) #ffff00 (b) #0000ff (c) #00ff00 (d) #ff0000
- 8.🌈 In #790000 the red part is the hex number 79. What is it as a normal number?
- 9.🌈 Which colour is rgb(255, 0, 255)? (a) yellow (b) magenta (c) bright green (d) blue
- 10.🌈 In #002900 the green part is the hex number 29. What is it as a normal number?
- 11.🌈 In #006900 the green part is the hex number 69. What is it as a normal number?
- 12.🌈 In #000050 the blue part is the hex number 50. What is it as a normal number?
- 13.🌈 In #2c0000 the red part is the hex number 2c. What is it as a normal number?
- 14.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
- 15.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) J (d) Z
- 16.🌈 Which colour is #ffff00? (a) red (b) black (c) bright green (d) yellow
- 17.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) black (c) red (d) cyan
- 18.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) cyan (c) black (d) blue
- 19.🌈 Which colour of light is strongest in rgb(28, 247, 76)? (a) red (b) blue (c) green
- 20.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) black (d) white
- 21.🌈 In #000093 the blue part is the hex number 93. What is it as a normal number?
- 22.🌈 In #0000f2 the blue part is the hex number f2. What is it as a normal number?
- 23.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) yellow (d) bright green
- 24.🌈 Which hex code is magenta? (a) #ff00ff (b) #ffff00 (c) #000000 (d) #0000ff
- 25.🌈 In #007f00 the green part is the hex number 7f. What is it as a normal number?
- 26.🌈 In #001a00 the green part is the hex number 1a. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(40, 179, 103)? (a) blue (b) green (c) red
- 28.🌈 In #001e00 the green part is the hex number 1e. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(139, 128, 166)? (a) red (b) blue (c) green
- 30.🌈 Which colour is #00ffff? (a) yellow (b) blue (c) cyan (d) red
- 31.🌈 In #00f500 the green part is the hex number f5. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(150, 135, 124)? (a) red (b) blue (c) green
- 33.🌈 Which colour is #ff00ff? (a) magenta (b) bright green (c) blue (d) cyan
- 34.🌈 Which hex code is white? (a) #00ffff (b) #ff0000 (c) #ff00ff (d) #ffffff
- 35.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 36.🌈 In #0000ae the blue part is the hex number ae. What is it as a normal number?
- 37.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(182, 121, 34)? (a) blue (b) green (c) red
- 39.🌈 Which colour of light is strongest in rgb(127, 155, 91)? (a) red (b) blue (c) green
- 40.🌈 In #000059 the blue part is the hex number 59. What is it as a normal number?
Answer key
- bright green
- bright green
- red
- red
- white
- #0000ff
- #ff0000
- 121
- magenta
- 41
- 105
- 80
- 44
- 42
- F
- yellow
- red
- black
- green
- white
- 147
- 242
- blue
- #ff00ff
- 127
- 26
- green
- 30
- blue
- cyan
- 245
- red
- magenta
- #ffffff
- 3
- 174
- 23
- red
- green
- 89
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids