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 #e60000 the red part is the hex number e6. What is it as a normal number?
- 2.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) blue (c) black (d) green
- 3.🌈 Which colour is #ffffff? (a) magenta (b) blue (c) red (d) white
- 4.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) Z (c) F (d) G
- 5.🌈 Which colour is rgb(0, 255, 0)? (a) bright green (b) blue (c) cyan (d) white
- 6.🌈 Which colour of light is strongest in rgb(94, 153, 77)? (a) blue (b) red (c) green
- 7.🌈 Which colour of light is strongest in rgb(151, 70, 93)? (a) green (b) blue (c) red
- 8.🌈 In #00b900 the green part is the hex number b9. What is it as a normal number?
- 9.🌈 In #00000b the blue part is the hex number 0b. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(57, 99, 227)? (a) red (b) blue (c) green
- 11.🌈 What is the biggest number one colour can have in rgb()? (a) 100 (b) 1000 (c) 99 (d) 255
- 12.🌈 Which colour of light is strongest in rgb(222, 9, 15)? (a) green (b) blue (c) red
- 13.🌈 Which colour of light is strongest in rgb(165, 33, 63)? (a) green (b) blue (c) red
- 14.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 3 (c) 2 (d) 6
- 15.🌈 Which hex code is black? (a) #00ff00 (b) #ff00ff (c) #ff0000 (d) #000000
- 16.🌈 Which colour of light is strongest in rgb(9, 95, 176)? (a) green (b) blue (c) red
- 17.🌈 Which colour is #0000ff? (a) white (b) blue (c) black (d) red
- 18.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) white (c) blue (d) green
- 19.🌈 Which colour of light is strongest in rgb(38, 105, 161)? (a) red (b) green (c) blue
- 20.🌈 In #2d0000 the red part is the hex number 2d. What is it as a normal number?
- 21.🌈 Which colour is rgb(0, 255, 255)? (a) red (b) blue (c) cyan (d) yellow
- 22.🌈 Which colour is rgb(255, 0, 255)? (a) magenta (b) bright green (c) red (d) yellow
- 23.🌈 Which hex code is bright green? (a) #ff0000 (b) #000000 (c) #00ff00 (d) #0000ff
- 24.🌈 Which hex code is white? (a) #ff0000 (b) #00ff00 (c) #ffffff (d) #0000ff
- 25.🌈 Which colour is #00ffff? (a) yellow (b) red (c) cyan (d) white
- 26.🌈 Which colour is rgb(255, 0, 0)? (a) blue (b) black (c) white (d) red
- 27.🌈 In #d30000 the red part is the hex number d3. What is it as a normal number?
- 28.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #ffffff (d) #00ff00
- 29.🌈 Which colour of light is strongest in rgb(224, 30, 5)? (a) red (b) green (c) blue
- 30.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) blue (c) bright green (d) red
- 31.🌈 In #000051 the blue part is the hex number 51. What is it as a normal number?
- 32.🌈 Which colour is #000000? (a) cyan (b) magenta (c) white (d) black
- 33.🌈 Which colour of light is strongest in rgb(122, 212, 63)? (a) green (b) red (c) blue
- 34.🌈 In #004700 the green part is the hex number 47. What is it as a normal number?
- 35.🌈 Which colour is #00ff00? (a) black (b) blue (c) red (d) bright green
- 36.🌈 Which colour is #ff0000? (a) white (b) red (c) black (d) blue
- 37.🌈 In #9e0000 the red part is the hex number 9e. What is it as a normal number?
- 38.🌈 In #a00000 the red part is the hex number a0. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(124, 109, 220)? (a) blue (b) red (c) green
- 40.🌈 In #00a400 the green part is the hex number a4. What is it as a normal number?
Answer key
- 230
- red
- white
- F
- bright green
- green
- red
- 185
- 11
- blue
- 255
- red
- red
- 3
- #000000
- blue
- blue
- blue
- blue
- 45
- cyan
- magenta
- #00ff00
- #ffffff
- cyan
- red
- 211
- #0000ff
- red
- white
- 81
- black
- green
- 71
- bright green
- red
- 158
- 160
- blue
- 164
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids