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(0, 0, 0)? (a) black (b) red (c) magenta (d) white
- 2.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) red (c) blue (d) yellow
- 3.🌈 Which colour is rgb(0, 0, 255)? (a) blue (b) magenta (c) bright green (d) cyan
- 4.🌈 Which colour is #00ff00? (a) magenta (b) cyan (c) white (d) bright green
- 5.🌈 Which hex code is red? (a) #ffffff (b) #00ff00 (c) #000000 (d) #ff0000
- 6.🌈 Which colour of light is strongest in rgb(244, 98, 117)? (a) red (b) green (c) blue
- 7.🌈 Which colour is #ffffff? (a) yellow (b) white (c) blue (d) magenta
- 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 9.🌈 Which hex code is blue? (a) #00ffff (b) #0000ff (c) #00ff00 (d) #ffff00
- 10.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
- 12.🌈 In #6b0000 the red part is the hex number 6b. What is it as a normal number?
- 13.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 6 (d) 2
- 14.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 15.🌈 Which colour of light is strongest in rgb(175, 138, 120)? (a) green (b) red (c) blue
- 16.🌈 In #000060 the blue part is the hex number 60. What is it as a normal number?
- 17.🌈 In #00a300 the green part is the hex number a3. What is it as a normal number?
- 18.🌈 In #0000f7 the blue part is the hex number f7. What is it as a normal number?
- 19.🌈 In #00d200 the green part is the hex number d2. What is it as a normal number?
- 20.🌈 In #000005 the blue part is the hex number 05. What is it as a normal number?
- 21.🌈 Which colour of light is strongest in rgb(195, 123, 29)? (a) blue (b) green (c) red
- 22.🌈 In #00a800 the green part is the hex number a8. What is it as a normal number?
- 23.🌈 Which colour is #00ffff? (a) magenta (b) black (c) yellow (d) cyan
- 24.🌈 Which colour of light is strongest in rgb(113, 187, 65)? (a) red (b) blue (c) green
- 25.🌈 In #310000 the red part is the hex number 31. What is it as a normal number?
- 26.🌈 In #00007a the blue part is the hex number 7a. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(10, 152, 46)? (a) blue (b) red (c) green
- 28.🌈 In #00af00 the green part is the hex number af. What is it as a normal number?
- 29.🌈 Which colour is #ff0000? (a) bright green (b) magenta (c) blue (d) red
- 30.🌈 Which colour of light is strongest in rgb(36, 120, 155)? (a) red (b) green (c) blue
- 31.🌈 Which colour is #ffff00? (a) bright green (b) red (c) black (d) yellow
- 32.🌈 In #006f00 the green part is the hex number 6f. What is it as a normal number?
- 33.🌈 In #000008 the blue part is the hex number 08. What is it as a normal number?
- 34.🌈 Which colour is #000000? (a) black (b) magenta (c) white (d) blue
- 35.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) black (d) red
- 36.🌈 Which hex code is bright green? (a) #00ffff (b) #ff00ff (c) #ff0000 (d) #00ff00
- 37.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 38.🌈 Which colour of light is strongest in rgb(214, 78, 71)? (a) green (b) red (c) blue
- 39.🌈 Which colour of light is strongest in rgb(126, 181, 66)? (a) red (b) green (c) blue
- 40.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) blue (d) red
Answer key
- black
- red
- blue
- bright green
- #ff0000
- red
- white
- F
- #0000ff
- 251
- blue
- 107
- 3
- red
- red
- 96
- 163
- 247
- 210
- 5
- red
- 168
- cyan
- green
- 49
- 122
- green
- 175
- red
- blue
- yellow
- 111
- 8
- black
- bright green
- #00ff00
- 255
- red
- green
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids