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(253, 23, 27)? (a) green (b) blue (c) red
- 2.🌈 Which colour is #ff0000? (a) red (b) bright green (c) magenta (d) blue
- 3.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) yellow (c) magenta (d) black
- 4.🌈 Which colour is rgb(0, 255, 255)? (a) bright green (b) white (c) blue (d) cyan
- 5.🌈 Which colour is rgb(0, 0, 255)? (a) magenta (b) cyan (c) yellow (d) blue
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
- 7.🌈 Which hex code is yellow? (a) #00ffff (b) #000000 (c) #ff0000 (d) #ffff00
- 8.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) cyan (c) magenta (d) white
- 9.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) bright green (c) black (d) cyan
- 10.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) yellow (c) magenta (d) black
- 11.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 99 (c) 100 (d) 255
- 12.🌈 Which colour is #000000? (a) bright green (b) yellow (c) black (d) red
- 13.🌈 Which colour of light is strongest in rgb(16, 43, 201)? (a) green (b) red (c) blue
- 14.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) blue (c) black (d) yellow
- 15.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 16.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
- 17.🌈 Which colour of light is strongest in rgb(16, 209, 100)? (a) blue (b) green (c) red
- 18.🌈 In #0000b8 the blue part is the hex number b8. What is it as a normal number?
- 19.🌈 Which colour is #ff00ff? (a) black (b) magenta (c) blue (d) cyan
- 20.🌈 Which colour of light is strongest in rgb(158, 20, 114)? (a) blue (b) red (c) green
- 21.🌈 Which colour is rgb(0, 255, 0)? (a) cyan (b) red (c) bright green (d) white
- 22.🌈 In #006500 the green part is the hex number 65. What is it as a normal number?
- 23.🌈 Which colour of light is strongest in rgb(28, 0, 195)? (a) green (b) blue (c) red
- 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 25.🌈 Which colour is #00ffff? (a) magenta (b) red (c) cyan (d) black
- 26.🌈 Which hex code is red? (a) #ff0000 (b) #00ff00 (c) #ff00ff (d) #00ffff
- 27.🌈 In #0000bb the blue part is the hex number bb. What is it as a normal number?
- 28.🌈 In #5f0000 the red part is the hex number 5f. What is it as a normal number?
- 29.🌈 Which hex code is cyan? (a) #ffff00 (b) #ff0000 (c) #00ffff (d) #0000ff
- 30.🌈 Which colour is #0000ff? (a) blue (b) yellow (c) bright green (d) cyan
- 31.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 32.🌈 In #003300 the green part is the hex number 33. What is it as a normal number?
- 33.🌈 Which colour of light is strongest in rgb(238, 104, 98)? (a) blue (b) red (c) green
- 34.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
- 35.🌈 Which colour is #ffff00? (a) white (b) blue (c) bright green (d) yellow
- 36.🌈 Which hex code is white? (a) #00ffff (b) #ffffff (c) #ffff00 (d) #00ff00
- 37.🌈 Which colour is #ffffff? (a) blue (b) bright green (c) white (d) cyan
- 38.🌈 In #0000ad the blue part is the hex number ad. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(0, 95, 180)? (a) green (b) red (c) blue
- 40.🌈 Which colour of light is strongest in rgb(127, 247, 14)? (a) blue (b) red (c) green
Answer key
- red
- red
- magenta
- cyan
- blue
- red
- #ffff00
- white
- red
- black
- 255
- black
- blue
- yellow
- blue
- 42
- green
- 184
- magenta
- red
- bright green
- 101
- blue
- 3
- cyan
- #ff0000
- 187
- 95
- #00ffff
- blue
- F
- 51
- red
- 1
- yellow
- #ffffff
- white
- 173
- blue
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids