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.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) red (d) green
- 2.🌈 Which colour of light is strongest in rgb(194, 57, 119)? (a) green (b) blue (c) red
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) green (d) blue
- 4.🌈 In #020000 the red part is the hex number 02. What is it as a normal number?
- 5.🌈 Which colour of light is strongest in rgb(231, 30, 85)? (a) blue (b) red (c) green
- 6.🌈 Which colour of light is strongest in rgb(61, 166, 137)? (a) green (b) blue (c) red
- 7.🌈 Which colour is rgb(255, 0, 255)? (a) bright green (b) red (c) magenta (d) blue
- 8.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) blue (c) white (d) red
- 9.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
- 10.🌈 In #00d700 the green part is the hex number d7. What is it as a normal number?
- 11.🌈 Which colour is #ffffff? (a) bright green (b) white (c) blue (d) yellow
- 12.🌈 Which hex code is magenta? (a) #000000 (b) #00ffff (c) #ffff00 (d) #ff00ff
- 13.🌈 In #200000 the red part is the hex number 20. What is it as a normal number?
- 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
- 15.🌈 In #00d300 the green part is the hex number d3. What is it as a normal number?
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 6 (d) 3
- 17.🌈 Which colour of light is strongest in rgb(202, 22, 34)? (a) green (b) blue (c) red
- 18.🌈 Which colour of light is strongest in rgb(9, 84, 183)? (a) red (b) green (c) blue
- 19.🌈 Which colour is #00ffff? (a) white (b) magenta (c) cyan (d) red
- 20.🌈 In #0000fa the blue part is the hex number fa. What is it as a normal number?
- 21.🌈 Which colour is #ffff00? (a) magenta (b) red (c) yellow (d) black
- 22.🌈 Which hex code is black? (a) #ff0000 (b) #ff00ff (c) #000000 (d) #00ffff
- 23.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) cyan (c) red (d) bright green
- 24.🌈 Which colour is rgb(255, 255, 0)? (a) blue (b) red (c) yellow (d) bright green
- 25.🌈 In #000000 the red part is the hex number 00. What is it as a normal number?
- 26.🌈 In #520000 the red part is the hex number 52. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(88, 196, 64)? (a) blue (b) red (c) green
- 28.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
- 29.🌈 In #008600 the green part is the hex number 86. What is it as a normal number?
- 30.🌈 Which hex code is blue? (a) #ff00ff (b) #00ff00 (c) #00ffff (d) #0000ff
- 31.🌈 In #350000 the red part is the hex number 35. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(20, 113, 232)? (a) blue (b) red (c) green
- 33.🌈 Which colour is #00ff00? (a) yellow (b) white (c) bright green (d) red
- 34.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
- 35.🌈 Which colour is rgb(0, 0, 255)? (a) red (b) bright green (c) white (d) blue
- 36.🌈 Which colour is #000000? (a) white (b) black (c) red (d) blue
- 37.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) red (d) magenta
- 38.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) red (c) white (d) cyan
- 39.🌈 In #d00000 the red part is the hex number d0. What is it as a normal number?
- 40.🌈 Which colour is #ff00ff? (a) bright green (b) magenta (c) red (d) white
Answer key
- red
- red
- blue
- 2
- red
- green
- magenta
- red
- 255
- 215
- white
- #ff00ff
- 32
- F
- 211
- 3
- red
- blue
- cyan
- 250
- yellow
- #000000
- cyan
- yellow
- 0
- 82
- green
- 179
- 134
- #0000ff
- 53
- blue
- bright green
- 75
- blue
- black
- bright green
- white
- 208
- magenta
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids