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 last two digits give? (a) green (b) blue (c) red (d) white
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
- 3.🌈 Which colour of light is strongest in rgb(1, 17, 246)? (a) green (b) blue (c) red
- 4.🌈 Which hex code is yellow? (a) #00ffff (b) #ff00ff (c) #000000 (d) #ffff00
- 5.🌈 Which colour is #000000? (a) cyan (b) red (c) black (d) bright green
- 6.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) black (c) bright green (d) blue
- 7.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) cyan (c) blue (d) red
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 9.🌈 Which colour of light is strongest in rgb(33, 65, 195)? (a) green (b) red (c) blue
- 10.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) magenta (c) blue (d) bright green
- 11.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 100 (d) 1000
- 12.🌈 In #ab0000 the red part is the hex number ab. What is it as a normal number?
- 13.🌈 Which colour of light is strongest in rgb(255, 8, 12)? (a) red (b) blue (c) green
- 14.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) magenta (d) black
- 15.🌈 In #f10000 the red part is the hex number f1. What is it as a normal number?
- 16.🌈 Which colour of light is strongest in rgb(64, 133, 206)? (a) red (b) blue (c) green
- 17.🌈 Which colour of light is strongest in rgb(41, 0, 170)? (a) red (b) green (c) blue
- 18.🌈 Which colour of light is strongest in rgb(206, 139, 83)? (a) red (b) green (c) blue
- 19.🌈 Which colour of light is strongest in rgb(41, 33, 161)? (a) blue (b) green (c) red
- 20.🌈 Which colour is #ffff00? (a) yellow (b) magenta (c) cyan (d) red
- 21.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) magenta (d) black
- 22.🌈 In #00008e the blue part is the hex number 8e. What is it as a normal number?
- 23.🌈 Which hex code is red? (a) #ff0000 (b) #ffff00 (c) #ffffff (d) #00ff00
- 24.🌈 Which colour is rgb(255, 255, 255)? (a) bright green (b) white (c) black (d) yellow
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) magenta (d) white
- 26.🌈 In #8c0000 the red part is the hex number 8c. What is it as a normal number?
- 27.🌈 In #f70000 the red part is the hex number f7. What is it as a normal number?
- 28.🌈 In #000024 the blue part is the hex number 24. What is it as a normal number?
- 29.🌈 Which colour of light is strongest in rgb(232, 126, 136)? (a) blue (b) red (c) green
- 30.🌈 In #f30000 the red part is the hex number f3. What is it as a normal number?
- 31.🌈 In #009200 the green part is the hex number 92. What is it as a normal number?
- 32.🌈 In #0a0000 the red part is the hex number 0a. What is it as a normal number?
- 33.🌈 Which colour is #ff00ff? (a) cyan (b) bright green (c) black (d) magenta
- 34.🌈 Which colour of light is strongest in rgb(119, 29, 192)? (a) blue (b) green (c) red
- 35.🌈 In #005b00 the green part is the hex number 5b. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(103, 157, 25)? (a) green (b) red (c) blue
- 37.🌈 Which colour of light is strongest in rgb(59, 206, 15)? (a) blue (b) green (c) red
- 38.🌈 Which colour is #0000ff? (a) bright green (b) cyan (c) blue (d) red
- 39.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 2 (c) 3 (d) 4
- 40.🌈 In #0000e8 the blue part is the hex number e8. What is it as a normal number?
Answer key
- blue
- red
- blue
- #ffff00
- black
- blue
- cyan
- F
- blue
- magenta
- 255
- 171
- red
- red
- 241
- blue
- blue
- red
- blue
- yellow
- bright green
- 142
- #ff0000
- white
- black
- 140
- 247
- 36
- red
- 243
- 146
- 10
- magenta
- blue
- 91
- green
- green
- blue
- 3
- 232
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids