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.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 2.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 99 (c) 1000 (d) 100
- 3.🌈 Which colour is #ff00ff? (a) cyan (b) magenta (c) blue (d) red
- 4.🌈 Which colour of light is strongest in rgb(160, 105, 90)? (a) green (b) blue (c) red
- 5.🌈 Which colour is #0000ff? (a) yellow (b) blue (c) red (d) white
- 6.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 6 (b) 3 (c) 4 (d) 2
- 7.🌈 Which colour is #000000? (a) red (b) white (c) magenta (d) black
- 8.🌈 Which colour of light is strongest in rgb(12, 110, 158)? (a) red (b) blue (c) green
- 9.🌈 Which hex code is black? (a) #ff0000 (b) #000000 (c) #0000ff (d) #00ff00
- 10.🌈 Which colour is #ffff00? (a) white (b) yellow (c) magenta (d) blue
- 11.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) F (d) G
- 12.🌈 In #0000eb the blue part is the hex number eb. What is it as a normal number?
- 13.🌈 Which colour is #00ff00? (a) bright green (b) white (c) cyan (d) red
- 14.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) blue (c) white (d) red
- 15.🌈 Which colour is #00ffff? (a) red (b) magenta (c) cyan (d) bright green
- 16.🌈 In #000a00 the green part is the hex number 0a. What is it as a normal number?
- 17.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #00ff00 (d) #ff0000
- 18.🌈 Which colour of light is strongest in rgb(13, 234, 115)? (a) blue (b) red (c) green
- 19.🌈 Which colour is rgb(0, 0, 0)? (a) bright green (b) red (c) black (d) white
- 20.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) bright green (c) red (d) magenta
- 21.🌈 Which colour of light is strongest in rgb(253, 46, 26)? (a) green (b) red (c) blue
- 22.🌈 Which colour is #ff0000? (a) red (b) white (c) cyan (d) magenta
- 23.🌈 Which hex code is white? (a) #0000ff (b) #ffffff (c) #000000 (d) #00ff00
- 24.🌈 Which colour of light is strongest in rgb(253, 121, 89)? (a) red (b) blue (c) green
- 25.🌈 In #4c0000 the red part is the hex number 4c. What is it as a normal number?
- 26.🌈 Which colour of light is strongest in rgb(223, 113, 28)? (a) red (b) blue (c) green
- 27.🌈 Which hex code is bright green? (a) #00ff00 (b) #0000ff (c) #000000 (d) #ffffff
- 28.🌈 In #00bc00 the green part is the hex number bc. What is it as a normal number?
- 29.🌈 In #5b0000 the red part is the hex number 5b. What is it as a normal number?
- 30.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) bright green (c) white (d) yellow
- 31.🌈 Which colour of light is strongest in rgb(245, 18, 46)? (a) green (b) red (c) blue
- 32.🌈 Which colour of light is strongest in rgb(109, 168, 137)? (a) red (b) blue (c) green
- 33.🌈 Which colour of light is strongest in rgb(156, 53, 84)? (a) green (b) red (c) blue
- 34.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) blue (c) magenta (d) red
- 35.🌈 Which colour of light is strongest in rgb(203, 102, 54)? (a) blue (b) green (c) red
- 36.🌈 In #ba0000 the red part is the hex number ba. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(40, 11, 198)? (a) red (b) green (c) blue
- 38.🌈 Which colour of light is strongest in rgb(112, 103, 247)? (a) blue (b) green (c) red
- 39.🌈 Which colour of light is strongest in rgb(178, 15, 132)? (a) green (b) red (c) blue
- 40.🌈 In #ad0000 the red part is the hex number ad. What is it as a normal number?
Answer key
- red
- 255
- magenta
- red
- blue
- 3
- black
- blue
- #000000
- yellow
- F
- 235
- bright green
- blue
- cyan
- 10
- #ff00ff
- green
- black
- red
- red
- red
- #ffffff
- red
- 76
- red
- #00ff00
- 188
- 91
- yellow
- red
- green
- red
- blue
- red
- 186
- blue
- blue
- red
- 173
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids