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) 6 (b) 2 (c) 3 (d) 4
- 2.🌈 In #002e00 the green part is the hex number 2e. What is it as a normal number?
- 3.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) green (d) blue
- 4.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) green (d) blue
- 5.🌈 Which colour is #ffff00? (a) blue (b) red (c) cyan (d) yellow
- 6.🌈 Which colour is rgb(0, 0, 255)? (a) black (b) bright green (c) blue (d) magenta
- 7.🌈 In #006f00 the green part is the hex number 6f. What is it as a normal number?
- 8.🌈 Which hex code is blue? (a) #00ff00 (b) #ffffff (c) #0000ff (d) #000000
- 9.🌈 Which colour is #ff0000? (a) blue (b) white (c) bright green (d) red
- 10.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) black (c) yellow (d) bright green
- 11.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 99 (d) 1000
- 12.🌈 Which colour is #00ff00? (a) black (b) cyan (c) bright green (d) red
- 13.🌈 In #530000 the red part is the hex number 53. What is it as a normal number?
- 14.🌈 In #000009 the blue part is the hex number 09. What is it as a normal number?
- 15.🌈 In #e70000 the red part is the hex number e7. What is it as a normal number?
- 16.🌈 Which colour of light is strongest in rgb(165, 125, 129)? (a) blue (b) red (c) green
- 17.🌈 Which colour is #00ffff? (a) red (b) magenta (c) white (d) cyan
- 18.🌈 Which colour is rgb(255, 0, 0)? (a) red (b) yellow (c) black (d) white
- 19.🌈 Which colour of light is strongest in rgb(219, 55, 137)? (a) green (b) blue (c) red
- 20.🌈 Which hex code is black? (a) #ffff00 (b) #00ffff (c) #ff00ff (d) #000000
- 21.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) black (c) blue (d) red
- 22.🌈 In #000800 the green part is the hex number 08. What is it as a normal number?
- 23.🌈 Which colour is #ff00ff? (a) bright green (b) white (c) yellow (d) magenta
- 24.🌈 Which hex code is yellow? (a) #0000ff (b) #ffff00 (c) #ff00ff (d) #ff0000
- 25.🌈 In #d20000 the red part is the hex number d2. What is it as a normal number?
- 26.🌈 Which colour is #ffffff? (a) blue (b) white (c) black (d) cyan
- 27.🌈 Which hex code is cyan? (a) #000000 (b) #ff00ff (c) #ffffff (d) #00ffff
- 28.🌈 Which hex code is bright green? (a) #000000 (b) #00ff00 (c) #ff00ff (d) #ffff00
- 29.🌈 Which colour of light is strongest in rgb(162, 125, 138)? (a) blue (b) red (c) green
- 30.🌈 In #0000a3 the blue part is the hex number a3. What is it as a normal number?
- 31.🌈 Which colour of light is strongest in rgb(193, 105, 91)? (a) green (b) blue (c) red
- 32.🌈 Which colour is rgb(255, 255, 255)? (a) magenta (b) yellow (c) red (d) white
- 33.🌈 Which colour of light is strongest in rgb(106, 122, 161)? (a) red (b) green (c) blue
- 34.🌈 Which colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) magenta (d) blue
- 35.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) F (d) J
- 36.🌈 In #0000b3 the blue part is the hex number b3. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) yellow (c) cyan (d) blue
- 38.🌈 Which colour of light is strongest in rgb(38, 58, 176)? (a) red (b) green (c) blue
- 39.🌈 In #008c00 the green part is the hex number 8c. What is it as a normal number?
- 40.🌈 In #006b00 the green part is the hex number 6b. What is it as a normal number?
Answer key
- 3
- 46
- blue
- red
- yellow
- blue
- 111
- #0000ff
- red
- black
- 255
- bright green
- 83
- 9
- 231
- red
- cyan
- red
- red
- #000000
- bright green
- 8
- magenta
- #ffff00
- 210
- white
- #00ffff
- #00ff00
- red
- 163
- red
- white
- blue
- cyan
- F
- 179
- yellow
- blue
- 140
- 107
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids