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 #00ff00? (a) magenta (b) bright green (c) red (d) white
- 2.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) blue (c) red (d) white
- 3.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) bright green (c) white (d) black
- 4.🌈 Which colour of light is strongest in rgb(229, 16, 105)? (a) blue (b) green (c) red
- 5.🌈 Which colour is #ff0000? (a) blue (b) red (c) black (d) white
- 6.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) cyan (c) yellow (d) bright green
- 7.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) F (c) J (d) G
- 8.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
- 9.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) red (c) bright green (d) blue
- 10.🌈 In #001b00 the green part is the hex number 1b. What is it as a normal number?
- 11.🌈 Which colour of light is strongest in rgb(174, 123, 82)? (a) red (b) blue (c) green
- 12.🌈 Which colour is #ffffff? (a) blue (b) black (c) white (d) cyan
- 13.🌈 Which colour of light is strongest in rgb(10, 154, 3)? (a) red (b) green (c) blue
- 14.🌈 Which colour is #000000? (a) white (b) cyan (c) black (d) yellow
- 15.🌈 Which colour of light is strongest in rgb(73, 198, 112)? (a) red (b) green (c) blue
- 16.🌈 Which hex code is black? (a) #ffffff (b) #000000 (c) #ff0000 (d) #00ff00
- 17.🌈 In #370000 the red part is the hex number 37. What is it as a normal number?
- 18.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #ff0000 (d) #000000
- 19.🌈 In #00e800 the green part is the hex number e8. What is it as a normal number?
- 20.🌈 Which colour of light is strongest in rgb(237, 116, 53)? (a) green (b) red (c) blue
- 21.🌈 Which colour of light is strongest in rgb(250, 7, 37)? (a) red (b) blue (c) green
- 22.🌈 What is the biggest number one colour can have in rgb()? (a) 99 (b) 100 (c) 255 (d) 1000
- 23.🌈 In #f70000 the red part is the hex number f7. What is it as a normal number?
- 24.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) black (d) red
- 25.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) black (c) red (d) magenta
- 26.🌈 In #rrggbb, which colour do the last two digits give? (a) blue (b) green (c) red (d) white
- 27.🌈 In #000087 the blue part is the hex number 87. What is it as a normal number?
- 28.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) red (d) black
- 29.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) white (c) bright green (d) magenta
- 30.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) bright green (c) white (d) cyan
- 31.🌈 Which hex code is cyan? (a) #00ff00 (b) #ffffff (c) #00ffff (d) #ff00ff
- 32.🌈 Which colour is #00ffff? (a) cyan (b) bright green (c) blue (d) black
- 33.🌈 In #001200 the green part is the hex number 12. What is it as a normal number?
- 34.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
- 35.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff0000 (d) #00ff00
- 36.🌈 In #000040 the blue part is the hex number 40. What is it as a normal number?
- 37.🌈 In #004b00 the green part is the hex number 4b. What is it as a normal number?
- 38.🌈 Which colour is #ffff00? (a) cyan (b) blue (c) red (d) yellow
- 39.🌈 In #00c600 the green part is the hex number c6. What is it as a normal number?
- 40.🌈 Which colour of light is strongest in rgb(43, 230, 9)? (a) green (b) red (c) blue
Answer key
- bright green
- blue
- white
- red
- red
- bright green
- F
- 3
- red
- 27
- red
- white
- green
- black
- green
- #000000
- 55
- #ffffff
- 232
- red
- red
- 255
- 247
- blue
- black
- blue
- 135
- red
- magenta
- cyan
- #00ffff
- cyan
- 18
- 16
- #0000ff
- 64
- 75
- yellow
- 198
- green
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids