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 #00006e the blue part is the hex number 6e. What is it as a normal number?
- 2.🌈 Which colour of light is strongest in rgb(240, 52, 55)? (a) blue (b) green (c) red
- 3.🌈 In #000051 the blue part is the hex number 51. What is it as a normal number?
- 4.🌈 Which hex code is yellow? (a) #0000ff (b) #ffffff (c) #ffff00 (d) #ff0000
- 5.🌈 Which colour is #00ff00? (a) yellow (b) red (c) blue (d) bright green
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 7.🌈 Which colour of light is strongest in rgb(210, 0, 114)? (a) red (b) green (c) blue
- 8.🌈 Which colour of light is strongest in rgb(134, 127, 205)? (a) green (b) blue (c) red
- 9.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) bright green (d) white
- 10.🌈 Which colour is rgb(255, 255, 255)? (a) yellow (b) white (c) magenta (d) black
- 11.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) bright green (c) cyan (d) yellow
- 12.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 3 (c) 4 (d) 6
- 13.🌈 Which colour is #ffff00? (a) red (b) white (c) yellow (d) cyan
- 14.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 255 (c) 99 (d) 100
- 15.🌈 Which hex code is bright green? (a) #ff00ff (b) #ffff00 (c) #00ff00 (d) #ff0000
- 16.🌈 In #007d00 the green part is the hex number 7d. What is it as a normal number?
- 17.🌈 In #820000 the red part is the hex number 82. What is it as a normal number?
- 18.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
- 19.🌈 Which colour of light is strongest in rgb(255, 108, 73)? (a) blue (b) red (c) green
- 20.🌈 Which colour is #ffffff? (a) bright green (b) blue (c) white (d) black
- 21.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) J (c) G (d) F
- 22.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) blue (c) bright green (d) cyan
- 23.🌈 Which colour of light is strongest in rgb(80, 62, 208)? (a) green (b) red (c) blue
- 24.🌈 In #e00000 the red part is the hex number e0. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(177, 101, 56)? (a) blue (b) red (c) green
- 26.🌈 In #000006 the blue part is the hex number 06. What is it as a normal number?
- 27.🌈 In #ea0000 the red part is the hex number ea. What is it as a normal number?
- 28.🌈 Which colour is #00ffff? (a) blue (b) black (c) cyan (d) bright green
- 29.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) yellow (d) red
- 30.🌈 In #008f00 the green part is the hex number 8f. What is it as a normal number?
- 31.🌈 Which colour is #ff0000? (a) blue (b) red (c) bright green (d) yellow
- 32.🌈 In #c20000 the red part is the hex number c2. What is it as a normal number?
- 33.🌈 Which hex code is red? (a) #0000ff (b) #00ffff (c) #ff0000 (d) #ff00ff
- 34.🌈 Which colour of light is strongest in rgb(170, 79, 75)? (a) red (b) green (c) blue
- 35.🌈 In #0000b0 the blue part is the hex number b0. What is it as a normal number?
- 36.🌈 In #3b0000 the red part is the hex number 3b. What is it as a normal number?
- 37.🌈 Which colour of light is strongest in rgb(254, 129, 42)? (a) green (b) red (c) blue
- 38.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) cyan (c) white (d) yellow
- 39.🌈 Which colour of light is strongest in rgb(181, 9, 68)? (a) green (b) blue (c) red
- 40.🌈 Which colour is #0000ff? (a) bright green (b) magenta (c) yellow (d) blue
Answer key
- 110
- red
- 81
- #ffff00
- bright green
- blue
- red
- blue
- red
- white
- yellow
- 3
- yellow
- 255
- #00ff00
- 125
- 130
- red
- red
- white
- F
- bright green
- blue
- 224
- red
- 6
- 234
- cyan
- magenta
- 143
- red
- 194
- #ff0000
- red
- 176
- 59
- red
- cyan
- red
- blue
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids