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, 0)? (a) blue (b) magenta (c) yellow (d) red
- 2.🌈 Which colour of light is strongest in rgb(192, 99, 7)? (a) green (b) blue (c) red
- 3.🌈 Which colour of light is strongest in rgb(138, 139, 154)? (a) green (b) blue (c) red
- 4.🌈 Which hex code is magenta? (a) #ff00ff (b) #00ffff (c) #ffff00 (d) #00ff00
- 5.🌈 In #000011 the blue part is the hex number 11. What is it as a normal number?
- 6.🌈 In #00009f the blue part is the hex number 9f. What is it as a normal number?
- 7.🌈 Which colour is rgb(255, 0, 255)? (a) cyan (b) magenta (c) red (d) blue
- 8.🌈 Which hex code is white? (a) #ffffff (b) #0000ff (c) #00ffff (d) #ff00ff
- 9.🌈 Which hex code is red? (a) #ff0000 (b) #ff00ff (c) #ffffff (d) #00ffff
- 10.🌈 Which colour of light is strongest in rgb(113, 180, 91)? (a) green (b) red (c) blue
- 11.🌈 In #00cd00 the green part is the hex number cd. What is it as a normal number?
- 12.🌈 Which colour is #0000ff? (a) white (b) blue (c) yellow (d) cyan
- 13.🌈 Which colour is #ffff00? (a) cyan (b) yellow (c) black (d) magenta
- 14.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
- 15.🌈 Which colour is #00ff00? (a) black (b) white (c) red (d) bright green
- 16.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) cyan (c) blue (d) bright green
- 17.🌈 In #00b200 the green part is the hex number b2. What is it as a normal number?
- 18.🌈 Which hex code is black? (a) #ffff00 (b) #0000ff (c) #ff0000 (d) #000000
- 19.🌈 In #770000 the red part is the hex number 77. What is it as a normal number?
- 20.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 21.🌈 Which colour is rgb(0, 0, 255)? (a) cyan (b) black (c) white (d) blue
- 22.🌈 Which colour is #00ffff? (a) cyan (b) blue (c) yellow (d) magenta
- 23.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) blue (d) red
- 24.🌈 Which colour is #ffffff? (a) magenta (b) red (c) bright green (d) white
- 25.🌈 Which hex code is bright green? (a) #00ff00 (b) #ff0000 (c) #000000 (d) #0000ff
- 26.🌈 In #000017 the blue part is the hex number 17. What is it as a normal number?
- 27.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 6 (c) 2 (d) 3
- 28.🌈 Which colour is #ff0000? (a) magenta (b) bright green (c) white (d) red
- 29.🌈 In #000051 the blue part is the hex number 51. What is it as a normal number?
- 30.🌈 In #00ce00 the green part is the hex number ce. What is it as a normal number?
- 31.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) cyan (c) blue (d) white
- 32.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
- 33.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) bright green (c) white (d) magenta
- 34.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
- 35.🌈 Which colour of light is strongest in rgb(38, 239, 50)? (a) red (b) green (c) blue
- 36.🌈 Which colour of light is strongest in rgb(216, 70, 15)? (a) blue (b) green (c) red
- 37.🌈 Which colour of light is strongest in rgb(166, 3, 56)? (a) green (b) red (c) blue
- 38.🌈 Which colour is rgb(0, 255, 255)? (a) black (b) blue (c) red (d) cyan
- 39.🌈 Which colour of light is strongest in rgb(48, 236, 52)? (a) green (b) red (c) blue
- 40.🌈 Which hex code is cyan? (a) #ff00ff (b) #ffffff (c) #00ff00 (d) #00ffff
Answer key
- red
- red
- blue
- #ff00ff
- 17
- 159
- magenta
- #ffffff
- #ff0000
- green
- 205
- blue
- yellow
- red
- bright green
- bright green
- 178
- #000000
- 119
- F
- blue
- cyan
- blue
- white
- #00ff00
- 23
- 3
- red
- 81
- 206
- white
- 255
- yellow
- 1
- green
- red
- red
- cyan
- green
- #00ffff
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids