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.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 2.🌈 Which colour is #00ff00? (a) magenta (b) black (c) red (d) bright green
- 3.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) red (c) white (d) bright green
- 4.🌈 Which colour is rgb(255, 255, 0)? (a) cyan (b) black (c) blue (d) yellow
- 5.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) bright green (c) black (d) magenta
- 6.🌈 Which colour of light is strongest in rgb(174, 62, 137)? (a) red (b) green (c) blue
- 7.🌈 Which colour of light is strongest in rgb(12, 176, 7)? (a) green (b) blue (c) red
- 8.🌈 Which hex code is black? (a) #000000 (b) #ffffff (c) #ffff00 (d) #ff0000
- 9.🌈 Which colour of light is strongest in rgb(223, 48, 95)? (a) green (b) blue (c) red
- 10.🌈 Which colour of light is strongest in rgb(252, 24, 28)? (a) red (b) green (c) blue
- 11.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) blue (c) red (d) green
- 12.🌈 Which colour is rgb(255, 0, 255)? (a) red (b) yellow (c) magenta (d) bright green
- 13.🌈 In #00f300 the green part is the hex number f3. What is it as a normal number?
- 14.🌈 In #e40000 the red part is the hex number e4. What is it as a normal number?
- 15.🌈 Which colour is #000000? (a) blue (b) red (c) white (d) black
- 16.🌈 Which colour of light is strongest in rgb(231, 36, 77)? (a) red (b) blue (c) green
- 17.🌈 Which colour of light is strongest in rgb(211, 19, 107)? (a) green (b) red (c) blue
- 18.🌈 Which colour of light is strongest in rgb(239, 97, 75)? (a) blue (b) green (c) red
- 19.🌈 Which hex code is magenta? (a) #ffffff (b) #ff0000 (c) #00ffff (d) #ff00ff
- 20.🌈 Which colour is #ff0000? (a) blue (b) white (c) black (d) red
- 21.🌈 Which colour is rgb(0, 0, 255)? (a) yellow (b) magenta (c) red (d) blue
- 22.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 255 (c) 99 (d) 1000
- 23.🌈 In #00ce00 the green part is the hex number ce. What is it as a normal number?
- 24.🌈 In #0000d2 the blue part is the hex number d2. What is it as a normal number?
- 25.🌈 Which colour of light is strongest in rgb(58, 124, 220)? (a) blue (b) green (c) red
- 26.🌈 Which colour of light is strongest in rgb(219, 30, 15)? (a) red (b) blue (c) green
- 27.🌈 Which colour of light is strongest in rgb(236, 38, 19)? (a) red (b) blue (c) green
- 28.🌈 Which colour is #ffff00? (a) bright green (b) red (c) yellow (d) cyan
- 29.🌈 In #002a00 the green part is the hex number 2a. What is it as a normal number?
- 30.🌈 Which colour is #0000ff? (a) black (b) magenta (c) blue (d) cyan
- 31.🌈 Which colour of light is strongest in rgb(74, 109, 153)? (a) red (b) blue (c) green
- 32.🌈 Which colour is #ff00ff? (a) blue (b) magenta (c) red (d) bright green
- 33.🌈 In #0000ad the blue part is the hex number ad. What is it as a normal number?
- 34.🌈 Which colour is rgb(255, 255, 255)? (a) red (b) magenta (c) blue (d) white
- 35.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 36.🌈 Which colour of light is strongest in rgb(165, 21, 31)? (a) red (b) green (c) blue
- 37.🌈 Which colour of light is strongest in rgb(16, 152, 110)? (a) green (b) red (c) blue
- 38.🌈 Which hex code is white? (a) #00ff00 (b) #ff00ff (c) #000000 (d) #ffffff
- 39.🌈 Which hex code is cyan? (a) #ff00ff (b) #ffff00 (c) #ffffff (d) #00ffff
- 40.🌈 In #220000 the red part is the hex number 22. What is it as a normal number?
Answer key
- 3
- bright green
- red
- yellow
- bright green
- red
- green
- #000000
- red
- red
- blue
- magenta
- 243
- 228
- black
- red
- red
- red
- #ff00ff
- red
- blue
- 255
- 206
- 210
- blue
- red
- red
- yellow
- 42
- blue
- blue
- magenta
- 173
- white
- F
- red
- green
- #ffffff
- #00ffff
- 34
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids