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) cyan (b) black (c) bright green (d) red
- 2.🌈 Which hex code is red? (a) #0000ff (b) #000000 (c) #ff0000 (d) #00ff00
- 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 4.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #ff0000
- 5.🌈 Which colour of light is strongest in rgb(61, 30, 211)? (a) red (b) blue (c) green
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 7.🌈 Which colour is #00ffff? (a) white (b) bright green (c) cyan (d) magenta
- 8.🌈 Which hex code is blue? (a) #ffffff (b) #0000ff (c) #00ff00 (d) #ff00ff
- 9.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 10.🌈 Which colour of light is strongest in rgb(169, 9, 81)? (a) blue (b) red (c) green
- 11.🌈 Which colour of light is strongest in rgb(160, 79, 30)? (a) green (b) red (c) blue
- 12.🌈 Which colour is #000000? (a) yellow (b) white (c) black (d) bright green
- 13.🌈 In #4b0000 the red part is the hex number 4b. What is it as a normal number?
- 14.🌈 Which colour is #ffffff? (a) cyan (b) blue (c) white (d) bright green
- 15.🌈 Which colour of light is strongest in rgb(102, 30, 192)? (a) green (b) red (c) blue
- 16.🌈 In #da0000 the red part is the hex number da. What is it as a normal number?
- 17.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ff00 (c) #0000ff (d) #ffff00
- 18.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) red (c) white (d) blue
- 19.🌈 Which colour of light is strongest in rgb(126, 176, 12)? (a) blue (b) green (c) red
- 20.🌈 Which colour of light is strongest in rgb(125, 9, 215)? (a) blue (b) red (c) green
- 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 22.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) yellow (d) bright green
- 23.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
- 24.🌈 Which colour of light is strongest in rgb(59, 172, 69)? (a) green (b) blue (c) red
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) red (b) yellow (c) black (d) white
- 26.🌈 In #004200 the green part is the hex number 42. What is it as a normal number?
- 27.🌈 In #280000 the red part is the hex number 28. What is it as a normal number?
- 28.🌈 Which colour of light is strongest in rgb(9, 155, 138)? (a) blue (b) green (c) red
- 29.🌈 Which colour is #00ff00? (a) bright green (b) red (c) white (d) black
- 30.🌈 Which colour is #0000ff? (a) black (b) blue (c) magenta (d) bright green
- 31.🌈 Which colour is #ffff00? (a) cyan (b) red (c) yellow (d) magenta
- 32.🌈 Which colour is #ff0000? (a) yellow (b) magenta (c) cyan (d) red
- 33.🌈 Which colour of light is strongest in rgb(179, 115, 68)? (a) red (b) blue (c) green
- 34.🌈 In #005c00 the green part is the hex number 5c. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(40, 76, 247)? (a) green (b) blue (c) red
- 36.🌈 Which hex code is black? (a) #ff00ff (b) #000000 (c) #00ffff (d) #ffff00
- 37.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) blue (c) red (d) magenta
- 38.🌈 In #00008f the blue part is the hex number 8f. What is it as a normal number?
- 39.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(138, 205, 65)? (a) green (b) blue (c) red
Answer key
- bright green
- #ff0000
- 3
- #00ff00
- blue
- red
- cyan
- #0000ff
- blue
- red
- red
- black
- 75
- white
- blue
- 218
- #ff00ff
- blue
- green
- blue
- 255
- magenta
- 78
- green
- black
- 66
- 40
- green
- bright green
- blue
- yellow
- red
- red
- 92
- blue
- #000000
- red
- 143
- 8
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids