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 of light is strongest in rgb(23, 214, 111)? (a) green (b) blue (c) red
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 3.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) blue (d) magenta
- 4.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #ff0000
- 5.🌈 Which colour of light is strongest in rgb(213, 89, 58)? (a) blue (b) red (c) green
- 6.🌈 Which colour is rgb(255, 0, 0)? (a) magenta (b) black (c) red (d) bright green
- 7.🌈 In #005200 the green part is the hex number 52. What is it as a normal number?
- 8.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) cyan
- 9.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) magenta (c) white (d) black
- 10.🌈 Which colour of light is strongest in rgb(86, 237, 126)? (a) red (b) green (c) blue
- 11.🌈 Which colour is #ff00ff? (a) blue (b) black (c) magenta (d) bright green
- 12.🌈 Which hex code is bright green? (a) #ff00ff (b) #ff0000 (c) #000000 (d) #00ff00
- 13.🌈 Which colour is #ffffff? (a) black (b) white (c) magenta (d) blue
- 14.🌈 Which colour of light is strongest in rgb(212, 86, 70)? (a) blue (b) red (c) green
- 15.🌈 In #c60000 the red part is the hex number c6. What is it as a normal number?
- 16.🌈 In #00d500 the green part is the hex number d5. What is it as a normal number?
- 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 4 (c) 6 (d) 2
- 18.🌈 Which hex code is white? (a) #ffffff (b) #00ffff (c) #ff0000 (d) #ffff00
- 19.🌈 Which colour is #00ffff? (a) black (b) bright green (c) red (d) cyan
- 20.🌈 Which colour of light is strongest in rgb(79, 135, 155)? (a) green (b) blue (c) red
- 21.🌈 Which colour of light is strongest in rgb(197, 8, 33)? (a) blue (b) red (c) green
- 22.🌈 Which colour of light is strongest in rgb(157, 86, 60)? (a) blue (b) red (c) green
- 23.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
- 24.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) magenta (d) bright green
- 25.🌈 In #000070 the blue part is the hex number 70. What is it as a normal number?
- 26.🌈 In #000001 the blue part is the hex number 01. What is it as a normal number?
- 27.🌈 In #007c00 the green part is the hex number 7c. What is it as a normal number?
- 28.🌈 Which colour is #ff0000? (a) red (b) blue (c) black (d) yellow
- 29.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) J (c) Z (d) F
- 30.🌈 In #fa0000 the red part is the hex number fa. What is it as a normal number?
- 31.🌈 Which colour is #0000ff? (a) white (b) black (c) red (d) blue
- 32.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) cyan (c) blue (d) bright green
- 33.🌈 In #000038 the blue part is the hex number 38. What is it as a normal number?
- 34.🌈 Which colour is #00ff00? (a) bright green (b) black (c) blue (d) red
- 35.🌈 Which hex code is red? (a) #00ff00 (b) #000000 (c) #ff0000 (d) #ffffff
- 36.🌈 Which hex code is black? (a) #ffffff (b) #00ffff (c) #000000 (d) #ffff00
- 37.🌈 In #002700 the green part is the hex number 27. What is it as a normal number?
- 38.🌈 In #00c600 the green part is the hex number c6. What is it as a normal number?
- 39.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 40.🌈 In #980000 the red part is the hex number 98. What is it as a normal number?
Answer key
- green
- red
- cyan
- #ff00ff
- red
- red
- 82
- yellow
- magenta
- green
- magenta
- #00ff00
- white
- red
- 198
- 213
- 3
- #ffffff
- cyan
- blue
- red
- red
- blue
- bright green
- 112
- 1
- 124
- red
- F
- 250
- blue
- blue
- 56
- bright green
- #ff0000
- #000000
- 39
- 198
- 255
- 152
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids