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 hex code is blue? (a) #0000ff (b) #00ff00 (c) #ff00ff (d) #000000
- 2.🌈 Which colour is #0000ff? (a) white (b) red (c) black (d) blue
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 5.🌈 In #00002a the blue part is the hex number 2a. What is it as a normal number?
- 6.🌈 Which colour is #000000? (a) bright green (b) black (c) magenta (d) blue
- 7.🌈 Which colour is #ffff00? (a) bright green (b) yellow (c) cyan (d) red
- 8.🌈 Which colour is #00ffff? (a) red (b) blue (c) cyan (d) white
- 9.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 10.🌈 Which colour is #ff00ff? (a) yellow (b) red (c) magenta (d) blue
- 11.🌈 Which colour of light is strongest in rgb(58, 232, 65)? (a) green (b) blue (c) red
- 12.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
- 13.🌈 Which hex code is bright green? (a) #00ff00 (b) #00ffff (c) #000000 (d) #0000ff
- 14.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 15.🌈 Which colour is rgb(0, 255, 0)? (a) black (b) red (c) bright green (d) yellow
- 16.🌈 Which colour of light is strongest in rgb(186, 63, 39)? (a) green (b) blue (c) red
- 17.🌈 In #004d00 the green part is the hex number 4d. What is it as a normal number?
- 18.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) white (c) blue (d) magenta
- 19.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?
- 20.🌈 Which colour of light is strongest in rgb(126, 189, 107)? (a) red (b) blue (c) green
- 21.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) cyan (d) white
- 22.🌈 Which colour is #ffffff? (a) white (b) cyan (c) red (d) bright green
- 23.🌈 Which colour of light is strongest in rgb(15, 175, 76)? (a) blue (b) red (c) green
- 24.🌈 Which colour of light is strongest in rgb(40, 206, 0)? (a) blue (b) red (c) green
- 25.🌈 Which colour of light is strongest in rgb(96, 38, 177)? (a) red (b) blue (c) green
- 26.🌈 Which colour is #00ff00? (a) bright green (b) red (c) white (d) black
- 27.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) yellow (c) blue (d) white
- 28.🌈 Which colour of light is strongest in rgb(166, 13, 81)? (a) green (b) blue (c) red
- 29.🌈 Which colour of light is strongest in rgb(89, 97, 164)? (a) red (b) green (c) blue
- 30.🌈 Which colour is rgb(255, 255, 255)? (a) cyan (b) blue (c) white (d) yellow
- 31.🌈 Which hex code is cyan? (a) #ff00ff (b) #ff0000 (c) #ffff00 (d) #00ffff
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) cyan (c) white (d) bright green
- 33.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(129, 201, 128)? (a) green (b) red (c) blue
- 35.🌈 In #0000e9 the blue part is the hex number e9. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(0, 161, 99)? (a) red (b) green (c) blue
- 37.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
- 38.🌈 Which colour of light is strongest in rgb(19, 48, 164)? (a) red (b) blue (c) green
- 39.🌈 Which colour of light is strongest in rgb(43, 25, 187)? (a) red (b) blue (c) green
- 40.🌈 Which hex code is black? (a) #ffffff (b) #ff00ff (c) #00ffff (d) #000000
Answer key
- #0000ff
- blue
- blue
- red
- 42
- black
- yellow
- cyan
- 3
- magenta
- green
- F
- #00ff00
- 255
- bright green
- red
- 77
- magenta
- 63
- green
- black
- white
- green
- green
- blue
- bright green
- blue
- red
- blue
- white
- #00ffff
- cyan
- 71
- green
- 233
- green
- 242
- blue
- blue
- #000000
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids