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.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 255 (d) 1000
- 2.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #ff00ff (d) #ff0000
- 3.🌈 Which hex code is cyan? (a) #00ffff (b) #0000ff (c) #00ff00 (d) #ffff00
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
- 5.🌈 Which colour of light is strongest in rgb(227, 44, 129)? (a) blue (b) red (c) green
- 6.🌈 Which hex code is red? (a) #ffff00 (b) #00ff00 (c) #ff0000 (d) #ffffff
- 7.🌈 Which colour is #00ffff? (a) black (b) magenta (c) white (d) cyan
- 8.🌈 Which colour is #ffff00? (a) yellow (b) bright green (c) black (d) red
- 9.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) white (c) red (d) magenta
- 10.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) F (d) Z
- 11.🌈 Which colour of light is strongest in rgb(123, 119, 248)? (a) red (b) green (c) blue
- 12.🌈 Which colour of light is strongest in rgb(152, 25, 124)? (a) blue (b) green (c) red
- 13.🌈 In #000c00 the green part is the hex number 0c. What is it as a normal number?
- 14.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ffffff (d) #00ffff
- 15.🌈 In #002100 the green part is the hex number 21. What is it as a normal number?
- 16.🌈 Which colour is #000000? (a) black (b) bright green (c) magenta (d) cyan
- 17.🌈 Which colour of light is strongest in rgb(129, 151, 20)? (a) green (b) blue (c) red
- 18.🌈 Which colour of light is strongest in rgb(214, 25, 63)? (a) blue (b) red (c) green
- 19.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 20.🌈 In #009f00 the green part is the hex number 9f. What is it as a normal number?
- 21.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
- 22.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ff00 (c) #ff00ff (d) #000000
- 23.🌈 Which colour of light is strongest in rgb(36, 132, 170)? (a) blue (b) green (c) red
- 24.🌈 Which colour of light is strongest in rgb(250, 128, 66)? (a) red (b) blue (c) green
- 25.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) blue (c) cyan (d) red
- 26.🌈 Which colour of light is strongest in rgb(129, 220, 129)? (a) red (b) blue (c) green
- 27.🌈 Which colour is #ff0000? (a) magenta (b) cyan (c) red (d) yellow
- 28.🌈 Which colour of light is strongest in rgb(250, 8, 10)? (a) red (b) blue (c) green
- 29.🌈 In #00b300 the green part is the hex number b3. What is it as a normal number?
- 30.🌈 Which hex code is yellow? (a) #ffffff (b) #000000 (c) #ffff00 (d) #ff0000
- 31.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) white (d) blue
- 32.🌈 In #010000 the red part is the hex number 01. What is it as a normal number?
- 33.🌈 In #000056 the blue part is the hex number 56. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(250, 127, 94)? (a) green (b) blue (c) red
- 35.🌈 In #00000f the blue part is the hex number 0f. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(85, 77, 230)? (a) green (b) blue (c) red
- 37.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) bright green (d) blue
- 38.🌈 Which colour is #00ff00? (a) red (b) magenta (c) bright green (d) black
- 39.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) yellow (c) white (d) red
- 40.🌈 Which colour is #ff00ff? (a) magenta (b) red (c) white (d) bright green
Answer key
- 255
- #ffffff
- #00ffff
- red
- red
- #ff0000
- cyan
- yellow
- magenta
- F
- blue
- red
- 12
- #0000ff
- 33
- black
- green
- red
- blue
- 159
- 71
- #ff00ff
- blue
- red
- red
- green
- red
- red
- 179
- #ffff00
- cyan
- 1
- 86
- red
- 15
- blue
- bright green
- bright green
- white
- magenta
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids