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 #0000ff? (a) magenta (b) black (c) blue (d) red
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) F (d) Z
- 4.🌈 Which colour is rgb(0, 255, 0)? (a) red (b) white (c) bright green (d) yellow
- 5.🌈 In #fb0000 the red part is the hex number fb. What is it as a normal number?
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
- 7.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) white (d) red
- 8.🌈 Which colour is rgb(0, 255, 255)? (a) yellow (b) red (c) cyan (d) magenta
- 9.🌈 Which colour is #ffff00? (a) magenta (b) bright green (c) yellow (d) red
- 10.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) red (c) cyan (d) blue
- 11.🌈 Which hex code is yellow? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ffff00
- 12.🌈 Which colour of light is strongest in rgb(2, 127, 196)? (a) red (b) blue (c) green
- 13.🌈 Which hex code is black? (a) #ffffff (b) #00ffff (c) #000000 (d) #00ff00
- 14.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #00ffff
- 15.🌈 Which colour is #ff0000? (a) blue (b) black (c) cyan (d) red
- 16.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 4 (c) 3 (d) 2
- 17.🌈 In #000055 the blue part is the hex number 55. What is it as a normal number?
- 18.🌈 Which hex code is cyan? (a) #ff0000 (b) #00ffff (c) #0000ff (d) #ff00ff
- 19.🌈 Which colour of light is strongest in rgb(216, 55, 1)? (a) green (b) blue (c) red
- 20.🌈 Which colour of light is strongest in rgb(38, 171, 55)? (a) green (b) red (c) blue
- 21.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 22.🌈 Which colour of light is strongest in rgb(46, 19, 172)? (a) blue (b) red (c) green
- 23.🌈 In #a30000 the red part is the hex number a3. What is it as a normal number?
- 24.🌈 Which hex code is blue? (a) #0000ff (b) #000000 (c) #ff0000 (d) #ff00ff
- 25.🌈 In #2d0000 the red part is the hex number 2d. What is it as a normal number?
- 26.🌈 In #0000ba the blue part is the hex number ba. What is it as a normal number?
- 27.🌈 Which colour of light is strongest in rgb(54, 243, 133)? (a) green (b) blue (c) red
- 28.🌈 Which colour of light is strongest in rgb(57, 7, 155)? (a) red (b) blue (c) green
- 29.🌈 Which colour is rgb(0, 0, 255)? (a) bright green (b) blue (c) cyan (d) yellow
- 30.🌈 In #0000ea the blue part is the hex number ea. What is it as a normal number?
- 31.🌈 In #cb0000 the red part is the hex number cb. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(128, 68, 209)? (a) green (b) red (c) blue
- 33.🌈 In #f20000 the red part is the hex number f2. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(12, 177, 97)? (a) red (b) blue (c) green
- 35.🌈 Which colour of light is strongest in rgb(30, 6, 151)? (a) red (b) blue (c) green
- 36.🌈 Which hex code is red? (a) #0000ff (b) #ff0000 (c) #ffff00 (d) #00ffff
- 37.🌈 Which colour of light is strongest in rgb(8, 165, 80)? (a) blue (b) green (c) red
- 38.🌈 Which colour of light is strongest in rgb(35, 92, 203)? (a) green (b) red (c) blue
- 39.🌈 In #1b0000 the red part is the hex number 1b. What is it as a normal number?
- 40.🌈 In #000013 the blue part is the hex number 13. What is it as a normal number?
Answer key
- blue
- red
- F
- bright green
- 251
- blue
- white
- cyan
- yellow
- yellow
- #ffff00
- blue
- #000000
- #00ff00
- red
- 3
- 85
- #00ffff
- red
- green
- 255
- blue
- 163
- #0000ff
- 45
- 186
- green
- blue
- blue
- 234
- 203
- blue
- 242
- green
- blue
- #ff0000
- green
- blue
- 27
- 19
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids