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 #00d700 the green part is the hex number d7. What is it as a normal number?
- 2.🌈 In #00002e the blue part is the hex number 2e. What is it as a normal number?
- 3.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) blue (c) cyan (d) bright green
- 4.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) blue (d) black
- 5.🌈 Which colour is #00ffff? (a) blue (b) bright green (c) magenta (d) cyan
- 6.🌈 In #00009a the blue part is the hex number 9a. What is it as a normal number?
- 7.🌈 Which hex code is cyan? (a) #00ffff (b) #ffffff (c) #ff00ff (d) #0000ff
- 8.🌈 Which hex code is bright green? (a) #ffff00 (b) #00ffff (c) #ffffff (d) #00ff00
- 9.🌈 In #5b0000 the red part is the hex number 5b. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(131, 76, 183)? (a) red (b) green (c) blue
- 11.🌈 Which colour is #0000ff? (a) white (b) blue (c) bright green (d) black
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 100 (d) 99
- 13.🌈 In #cb0000 the red part is the hex number cb. What is it as a normal number?
- 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) G (d) Z
- 15.🌈 Which hex code is white? (a) #ff0000 (b) #ffff00 (c) #0000ff (d) #ffffff
- 16.🌈 Which colour of light is strongest in rgb(22, 160, 130)? (a) red (b) green (c) blue
- 17.🌈 Which colour of light is strongest in rgb(210, 54, 70)? (a) blue (b) green (c) red
- 18.🌈 Which colour is #ffff00? (a) cyan (b) red (c) white (d) yellow
- 19.🌈 Which colour is #00ff00? (a) bright green (b) yellow (c) magenta (d) cyan
- 20.🌈 Which colour is rgb(255, 255, 0)? (a) bright green (b) red (c) yellow (d) blue
- 21.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) green (d) black
- 22.🌈 Which colour of light is strongest in rgb(77, 37, 189)? (a) green (b) blue (c) red
- 23.🌈 In #000022 the blue part is the hex number 22. What is it as a normal number?
- 24.🌈 In #a80000 the red part is the hex number a8. What is it as a normal number?
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) yellow (b) bright green (c) black (d) cyan
- 26.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) blue (c) white (d) bright green
- 27.🌈 Which colour of light is strongest in rgb(9, 104, 159)? (a) blue (b) red (c) green
- 28.🌈 In #00ad00 the green part is the hex number ad. What is it as a normal number?
- 29.🌈 Which hex code is red? (a) #0000ff (b) #00ff00 (c) #ffff00 (d) #ff0000
- 30.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) magenta (c) red (d) black
- 31.🌈 Which colour of light is strongest in rgb(51, 197, 74)? (a) red (b) blue (c) green
- 32.🌈 Which colour is #000000? (a) red (b) white (c) cyan (d) black
- 33.🌈 Which colour is #ff0000? (a) red (b) black (c) cyan (d) magenta
- 34.🌈 Which colour of light is strongest in rgb(167, 114, 30)? (a) red (b) green (c) blue
- 35.🌈 In #0000e9 the blue part is the hex number e9. What is it as a normal number?
- 36.🌈 Which colour is #ff00ff? (a) black (b) bright green (c) magenta (d) blue
- 37.🌈 In #c90000 the red part is the hex number c9. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(174, 32, 86)? (a) blue (b) red (c) green
- 39.🌈 Which hex code is black? (a) #00ff00 (b) #ffffff (c) #000000 (d) #ffff00
- 40.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) green (d) white
Answer key
- 215
- 46
- bright green
- magenta
- cyan
- 154
- #00ffff
- #00ff00
- 91
- blue
- blue
- 255
- 203
- F
- #ffffff
- green
- red
- yellow
- bright green
- yellow
- red
- blue
- 34
- 168
- black
- white
- blue
- 173
- #ff0000
- red
- green
- black
- red
- red
- 233
- magenta
- 201
- red
- #000000
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids