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(130, 220, 104)? (a) red (b) blue (c) green
- 2.🌈 Which colour is #ffffff? (a) black (b) yellow (c) red (d) white
- 3.🌈 Which hex code is blue? (a) #ff00ff (b) #00ffff (c) #00ff00 (d) #0000ff
- 4.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) white (c) blue (d) red
- 5.🌈 In #008300 the green part is the hex number 83. What is it as a normal number?
- 6.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) G (d) F
- 7.🌈 In #006a00 the green part is the hex number 6a. What is it as a normal number?
- 8.🌈 Which colour is rgb(255, 0, 0)? (a) bright green (b) magenta (c) red (d) blue
- 9.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) black (c) red (d) green
- 10.🌈 Which colour is #ff00ff? (a) black (b) magenta (c) bright green (d) white
- 11.🌈 In #2e0000 the red part is the hex number 2e. What is it as a normal number?
- 12.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
- 13.🌈 In #a20000 the red part is the hex number a2. What is it as a normal number?
- 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
- 15.🌈 Which colour of light is strongest in rgb(220, 97, 59)? (a) blue (b) red (c) green
- 16.🌈 Which colour is rgb(0, 0, 255)? (a) white (b) bright green (c) magenta (d) blue
- 17.🌈 Which colour of light is strongest in rgb(183, 30, 117)? (a) green (b) blue (c) red
- 18.🌈 In #0000ad the blue part is the hex number ad. What is it as a normal number?
- 19.🌈 Which hex code is red? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #ffffff
- 20.🌈 In #0000d4 the blue part is the hex number d4. What is it as a normal number?
- 21.🌈 Which hex code is white? (a) #00ff00 (b) #000000 (c) #ffffff (d) #ff00ff
- 22.🌈 Which colour is #000000? (a) blue (b) black (c) bright green (d) magenta
- 23.🌈 Which hex code is black? (a) #0000ff (b) #00ff00 (c) #ffffff (d) #000000
- 24.🌈 Which hex code is cyan? (a) #000000 (b) #00ffff (c) #ff00ff (d) #00ff00
- 25.🌈 Which colour of light is strongest in rgb(178, 124, 70)? (a) green (b) blue (c) red
- 26.🌈 Which colour of light is strongest in rgb(197, 95, 12)? (a) green (b) red (c) blue
- 27.🌈 Which hex code is yellow? (a) #000000 (b) #ff0000 (c) #ffff00 (d) #0000ff
- 28.🌈 Which colour of light is strongest in rgb(184, 73, 64)? (a) blue (b) red (c) green
- 29.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #00ffff (d) #ffff00
- 30.🌈 Which colour is #ffff00? (a) white (b) blue (c) red (d) yellow
- 31.🌈 In #00003f the blue part is the hex number 3f. What is it as a normal number?
- 32.🌈 Which colour of light is strongest in rgb(41, 224, 99)? (a) blue (b) green (c) red
- 33.🌈 In #000014 the blue part is the hex number 14. What is it as a normal number?
- 34.🌈 Which colour is #00ff00? (a) bright green (b) red (c) cyan (d) yellow
- 35.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) cyan (c) yellow (d) white
- 36.🌈 Which colour of light is strongest in rgb(250, 47, 86)? (a) blue (b) green (c) red
- 37.🌈 Which colour of light is strongest in rgb(127, 10, 158)? (a) red (b) blue (c) green
- 38.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) red (c) blue (d) cyan
- 39.🌈 Which colour is rgb(255, 255, 255)? (a) black (b) magenta (c) white (d) red
- 40.🌈 In #00005f the blue part is the hex number 5f. What is it as a normal number?
Answer key
- green
- white
- #0000ff
- yellow
- 131
- F
- 106
- red
- red
- magenta
- 46
- blue
- 162
- 3
- red
- blue
- red
- 173
- #ff0000
- 212
- #ffffff
- black
- #000000
- #00ffff
- red
- red
- #ffff00
- red
- #00ff00
- yellow
- 63
- green
- 20
- bright green
- bright green
- red
- blue
- cyan
- white
- 95
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids