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 of light is strongest in rgb(14, 122, 174)? (a) green (b) blue (c) red
- 2.🌈 In #250000 the red part is the hex number 25. What is it as a normal number?
- 3.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 2 (b) 4 (c) 6 (d) 3
- 4.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 255 (d) 99
- 5.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
- 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) blue (c) white (d) green
- 7.🌈 In #dc0000 the red part is the hex number dc. What is it as a normal number?
- 8.🌈 Which hex code is magenta? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #ffffff
- 9.🌈 Which colour of light is strongest in rgb(234, 99, 53)? (a) green (b) blue (c) red
- 10.🌈 Which colour is #00ffff? (a) yellow (b) cyan (c) bright green (d) magenta
- 11.🌈 In #0000e9 the blue part is the hex number e9. What is it as a normal number?
- 12.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) bright green (d) red
- 13.🌈 In #990000 the red part is the hex number 99. What is it as a normal number?
- 14.🌈 Which colour is #ff0000? (a) yellow (b) black (c) red (d) magenta
- 15.🌈 Which colour of light is strongest in rgb(247, 61, 107)? (a) blue (b) green (c) red
- 16.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) magenta (c) cyan (d) yellow
- 17.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) magenta (c) red (d) bright green
- 18.🌈 Which colour is #00ff00? (a) red (b) black (c) white (d) bright green
- 19.🌈 In #420000 the red part is the hex number 42. What is it as a normal number?
- 20.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) blue (c) black (d) red
- 21.🌈 In #000100 the green part is the hex number 01. What is it as a normal number?
- 22.🌈 Which hex code is bright green? (a) #ffffff (b) #00ff00 (c) #ffff00 (d) #ff0000
- 23.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) blue (c) yellow (d) red
- 24.🌈 In #ad0000 the red part is the hex number ad. What is it as a normal number?
- 25.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) black (c) red (d) bright green
- 26.🌈 Which colour is #0000ff? (a) blue (b) magenta (c) bright green (d) red
- 27.🌈 Which hex code is yellow? (a) #ffff00 (b) #ff00ff (c) #ff0000 (d) #ffffff
- 28.🌈 Which colour of light is strongest in rgb(41, 187, 4)? (a) red (b) green (c) blue
- 29.🌈 Which hex code is cyan? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ff0000
- 30.🌈 In #000043 the blue part is the hex number 43. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(99, 152, 124)? (a) blue (b) green (c) red
- 32.🌈 Which colour of light is strongest in rgb(128, 239, 82)? (a) green (b) blue (c) red
- 33.🌈 In #540000 the red part is the hex number 54. What is it as a normal number?
- 34.🌈 Which colour of light is strongest in rgb(98, 24, 181)? (a) red (b) green (c) blue
- 35.🌈 Which colour of light is strongest in rgb(54, 16, 206)? (a) green (b) blue (c) red
- 36.🌈 Which colour is rgb(0, 0, 0)? (a) cyan (b) yellow (c) black (d) bright green
- 37.🌈 In #00003b the blue part is the hex number 3b. What is it as a normal number?
- 38.🌈 Which colour is #ffffff? (a) yellow (b) blue (c) red (d) white
- 39.🌈 Which hex code is white? (a) #00ff00 (b) #0000ff (c) #ffffff (d) #000000
- 40.🌈 In #020000 the red part is the hex number 02. What is it as a normal number?
Answer key
- blue
- 37
- 3
- 255
- F
- blue
- 220
- #ff00ff
- red
- cyan
- 233
- magenta
- 153
- red
- red
- cyan
- red
- bright green
- 66
- red
- 1
- #00ff00
- blue
- 173
- white
- blue
- #ffff00
- green
- #00ffff
- 67
- green
- green
- 84
- blue
- blue
- black
- 59
- white
- #ffffff
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids