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(105, 161, 55)? (a) green (b) red (c) blue
- 2.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #00ff00 (d) #ffffff
- 3.🌈 Which hex code is cyan? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #00ffff
- 4.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
- 5.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 255 (d) 100
- 6.🌈 Which colour of light is strongest in rgb(109, 201, 106)? (a) blue (b) red (c) green
- 7.🌈 Which colour is #ff0000? (a) white (b) bright green (c) red (d) yellow
- 8.🌈 Which hex code is blue? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #ffff00
- 9.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #ffff00 (d) #ff00ff
- 10.🌈 Which colour of light is strongest in rgb(243, 84, 115)? (a) red (b) blue (c) green
- 11.🌈 Which colour is #ff00ff? (a) black (b) cyan (c) magenta (d) bright green
- 12.🌈 Which colour of light is strongest in rgb(58, 203, 128)? (a) blue (b) green (c) red
- 13.🌈 Which colour of light is strongest in rgb(212, 106, 23)? (a) blue (b) green (c) red
- 14.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
- 15.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) black (c) cyan (d) white
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) cyan (c) bright green (d) yellow
- 17.🌈 Which colour is #00ff00? (a) black (b) cyan (c) blue (d) bright green
- 18.🌈 Which hex code is yellow? (a) #ff00ff (b) #ffffff (c) #00ffff (d) #ffff00
- 19.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) white (c) red (d) magenta
- 20.🌈 Which hex code is red? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #00ff00
- 21.🌈 Which colour is #ffff00? (a) bright green (b) cyan (c) yellow (d) black
- 22.🌈 In #00fa00 the green part is the hex number fa. What is it as a normal number?
- 23.🌈 In #00e400 the green part is the hex number e4. What is it as a normal number?
- 24.🌈 In #000007 the blue part is the hex number 07. What is it as a normal number?
- 25.🌈 In #00006b the blue part is the hex number 6b. What is it as a normal number?
- 26.🌈 In #3e0000 the red part is the hex number 3e. What is it as a normal number?
- 27.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) blue (c) cyan (d) red
- 28.🌈 In #009200 the green part is the hex number 92. What is it as a normal number?
- 29.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 30.🌈 Which colour of light is strongest in rgb(238, 40, 12)? (a) blue (b) green (c) red
- 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
- 32.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) magenta (c) blue (d) cyan
- 33.🌈 In #000047 the blue part is the hex number 47. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(106, 124, 215)? (a) red (b) blue (c) green
- 35.🌈 Which colour is #00ffff? (a) red (b) white (c) cyan (d) blue
- 36.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 37.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 38.🌈 In #000042 the blue part is the hex number 42. What is it as a normal number?
- 39.🌈 In #002b00 the green part is the hex number 2b. What is it as a normal number?
- 40.🌈 Which colour is #0000ff? (a) red (b) magenta (c) blue (d) cyan
Answer key
- green
- #ff00ff
- #00ffff
- 23
- 255
- green
- red
- #0000ff
- #000000
- red
- magenta
- green
- red
- 163
- white
- bright green
- bright green
- #ffff00
- red
- #ff0000
- yellow
- 250
- 228
- 7
- 107
- 62
- cyan
- 146
- 3
- red
- F
- yellow
- 71
- blue
- cyan
- red
- 241
- 66
- 43
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids