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 is rgb(255, 0, 255)? (a) cyan (b) yellow (c) red (d) magenta
- 2.🌈 Which hex code is red? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #00ffff
- 3.🌈 Which hex code is magenta? (a) #ff0000 (b) #ff00ff (c) #0000ff (d) #00ffff
- 4.🌈 Which colour is #00ffff? (a) bright green (b) blue (c) red (d) cyan
- 5.🌈 Which colour of light is strongest in rgb(15, 100, 246)? (a) blue (b) green (c) red
- 6.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) blue (c) green (d) red
- 7.🌈 In #080000 the red part is the hex number 08. What is it as a normal number?
- 8.🌈 In #005600 the green part is the hex number 56. What is it as a normal number?
- 9.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) blue (c) cyan (d) yellow
- 10.🌈 Which colour of light is strongest in rgb(33, 33, 175)? (a) blue (b) green (c) red
- 11.🌈 Which colour of light is strongest in rgb(252, 67, 68)? (a) blue (b) red (c) green
- 12.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 99 (c) 1000 (d) 255
- 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 14.🌈 Which colour of light is strongest in rgb(186, 64, 22)? (a) blue (b) green (c) red
- 15.🌈 Which colour is #ff0000? (a) magenta (b) red (c) cyan (d) bright green
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) red (c) blue (d) magenta
- 17.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 2 (c) 6 (d) 4
- 18.🌈 Which colour of light is strongest in rgb(10, 241, 107)? (a) green (b) red (c) blue
- 19.🌈 Which colour is #0000ff? (a) cyan (b) magenta (c) yellow (d) blue
- 20.🌈 Which colour of light is strongest in rgb(213, 35, 22)? (a) blue (b) red (c) green
- 21.🌈 Which colour is #000000? (a) white (b) black (c) bright green (d) yellow
- 22.🌈 Which hex code is blue? (a) #ff0000 (b) #0000ff (c) #000000 (d) #00ffff
- 23.🌈 Which colour of light is strongest in rgb(40, 189, 13)? (a) red (b) green (c) blue
- 24.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) green (d) red
- 25.🌈 In #00fb00 the green part is the hex number fb. What is it as a normal number?
- 26.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
- 27.🌈 In #00a400 the green part is the hex number a4. What is it as a normal number?
- 28.🌈 In #001a00 the green part is the hex number 1a. What is it as a normal number?
- 29.🌈 Which colour is #ffffff? (a) cyan (b) bright green (c) white (d) yellow
- 30.🌈 Which colour of light is strongest in rgb(155, 62, 9)? (a) blue (b) green (c) red
- 31.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) cyan (d) yellow
- 32.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) blue (c) bright green (d) cyan
- 33.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) red (c) yellow (d) magenta
- 34.🌈 Which hex code is white? (a) #0000ff (b) #ff00ff (c) #ffffff (d) #ff0000
- 35.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) red (c) magenta (d) white
- 36.🌈 In #460000 the red part is the hex number 46. What is it as a normal number?
- 37.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #0000ff (d) #00ffff
- 38.🌈 Which hex code is bright green? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #00ffff
- 39.🌈 Which colour of light is strongest in rgb(102, 214, 51)? (a) blue (b) red (c) green
- 40.🌈 In #6a0000 the red part is the hex number 6a. What is it as a normal number?
Answer key
- magenta
- #ff0000
- #ff00ff
- cyan
- blue
- red
- 8
- 86
- black
- blue
- red
- 255
- F
- red
- red
- bright green
- 3
- green
- blue
- red
- black
- #0000ff
- green
- blue
- 251
- 242
- 164
- 26
- white
- red
- blue
- cyan
- red
- #ffffff
- white
- 70
- #000000
- #00ff00
- green
- 106
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids