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 #008500 the green part is the hex number 85. What is it as a normal number?
- 2.🌈 Which colour of light is strongest in rgb(53, 217, 54)? (a) green (b) red (c) blue
- 3.🌈 Which colour is rgb(0, 255, 0)? (a) white (b) bright green (c) magenta (d) red
- 4.🌈 Which colour is #ffff00? (a) blue (b) red (c) white (d) yellow
- 5.🌈 In #0000d5 the blue part is the hex number d5. What is it as a normal number?
- 6.🌈 Which hex code is cyan? (a) #ff00ff (b) #00ffff (c) #0000ff (d) #ffff00
- 7.🌈 Which colour of light is strongest in rgb(228, 51, 125)? (a) red (b) green (c) blue
- 8.🌈 Which hex code is red? (a) #ff0000 (b) #ffffff (c) #000000 (d) #00ff00
- 9.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) green (c) red (d) blue
- 10.🌈 Which hex code is bright green? (a) #0000ff (b) #000000 (c) #ff00ff (d) #00ff00
- 11.🌈 Which colour of light is strongest in rgb(210, 69, 120)? (a) green (b) blue (c) red
- 12.🌈 Which colour is #00ffff? (a) cyan (b) red (c) yellow (d) bright green
- 13.🌈 Which colour is rgb(0, 255, 255)? (a) white (b) red (c) black (d) cyan
- 14.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) Z (c) J (d) F
- 15.🌈 Which colour is rgb(255, 0, 255)? (a) white (b) black (c) magenta (d) bright green
- 16.🌈 Which colour of light is strongest in rgb(15, 164, 70)? (a) red (b) blue (c) green
- 17.🌈 Which colour of light is strongest in rgb(53, 48, 158)? (a) green (b) red (c) blue
- 18.🌈 Which colour is #00ff00? (a) magenta (b) cyan (c) white (d) bright green
- 19.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) cyan (c) bright green (d) magenta
- 20.🌈 Which colour of light is strongest in rgb(70, 16, 227)? (a) red (b) green (c) blue
- 21.🌈 Which colour is rgb(0, 0, 0)? (a) blue (b) magenta (c) bright green (d) black
- 22.🌈 Which colour of light is strongest in rgb(66, 174, 0)? (a) green (b) red (c) blue
- 23.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) blue (d) white
- 24.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 3 (b) 6 (c) 4 (d) 2
- 25.🌈 In #b30000 the red part is the hex number b3. What is it as a normal number?
- 26.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) cyan (c) red (d) white
- 27.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
- 28.🌈 In #007400 the green part is the hex number 74. What is it as a normal number?
- 29.🌈 Which hex code is blue? (a) #ffff00 (b) #0000ff (c) #000000 (d) #ff00ff
- 30.🌈 Which colour of light is strongest in rgb(106, 38, 246)? (a) green (b) blue (c) red
- 31.🌈 In #0e0000 the red part is the hex number 0e. What is it as a normal number?
- 32.🌈 Which hex code is magenta? (a) #ff00ff (b) #000000 (c) #ff0000 (d) #0000ff
- 33.🌈 Which hex code is white? (a) #ffffff (b) #ffff00 (c) #ff0000 (d) #00ffff
- 34.🌈 Which colour of light is strongest in rgb(78, 115, 162)? (a) blue (b) red (c) green
- 35.🌈 In #000023 the blue part is the hex number 23. What is it as a normal number?
- 36.🌈 Which colour of light is strongest in rgb(13, 83, 233)? (a) red (b) blue (c) green
- 37.🌈 Which colour of light is strongest in rgb(172, 47, 19)? (a) green (b) blue (c) red
- 38.🌈 In #0000b1 the blue part is the hex number b1. What is it as a normal number?
- 39.🌈 Which colour of light is strongest in rgb(225, 24, 48)? (a) green (b) red (c) blue
- 40.🌈 In #970000 the red part is the hex number 97. What is it as a normal number?
Answer key
- 133
- green
- bright green
- yellow
- 213
- #00ffff
- red
- #ff0000
- red
- #00ff00
- red
- cyan
- cyan
- F
- magenta
- green
- blue
- bright green
- yellow
- blue
- black
- green
- blue
- 3
- 179
- red
- 255
- 116
- #0000ff
- blue
- 14
- #ff00ff
- #ffffff
- blue
- 35
- blue
- red
- 177
- red
- 151
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids