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 #001b00 the green part is the hex number 1b. What is it as a normal number?
- 2.🌈 How many pairs of hex digits are in a colour like #ff8800? (a) 4 (b) 2 (c) 3 (d) 6
- 3.🌈 Which colour of light is strongest in rgb(67, 175, 9)? (a) blue (b) red (c) green
- 4.🌈 In #0000c2 the blue part is the hex number c2. What is it as a normal number?
- 5.🌈 Which hex code is red? (a) #ff00ff (b) #ff0000 (c) #0000ff (d) #ffffff
- 6.🌈 In #880000 the red part is the hex number 88. What is it as a normal number?
- 7.🌈 Which colour of light is strongest in rgb(6, 102, 200)? (a) red (b) blue (c) green
- 8.🌈 Which colour of light is strongest in rgb(37, 54, 241)? (a) green (b) red (c) blue
- 9.🌈 In #340000 the red part is the hex number 34. What is it as a normal number?
- 10.🌈 Which colour of light is strongest in rgb(109, 154, 24)? (a) red (b) green (c) blue
- 11.🌈 Which colour is rgb(255, 255, 0)? (a) black (b) cyan (c) yellow (d) bright green
- 12.🌈 In #rrggbb, which colour do the first two digits give? (a) blue (b) green (c) black (d) red
- 13.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) red (c) blue (d) green
- 14.🌈 Which colour of light is strongest in rgb(253, 51, 9)? (a) blue (b) green (c) red
- 15.🌈 In #001000 the green part is the hex number 10. What is it as a normal number?
- 16.🌈 Which colour is #ffff00? (a) red (b) cyan (c) yellow (d) blue
- 17.🌈 Which colour is #00ff00? (a) cyan (b) blue (c) black (d) bright green
- 18.🌈 Which colour is #ffffff? (a) white (b) magenta (c) cyan (d) yellow
- 19.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) red (d) black
- 20.🌈 What is the biggest number one colour can have in rgb()? (a) 1000 (b) 100 (c) 99 (d) 255
- 21.🌈 Which colour of light is strongest in rgb(185, 20, 19)? (a) red (b) blue (c) green
- 22.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) cyan (c) yellow (d) blue
- 23.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) white (c) bright green (d) red
- 24.🌈 Which colour of light is strongest in rgb(174, 1, 6)? (a) red (b) green (c) blue
- 25.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #000000 (d) #ffff00
- 26.🌈 Which hex code is bright green? (a) #00ff00 (b) #ffffff (c) #ff0000 (d) #0000ff
- 27.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) G (c) Z (d) F
- 28.🌈 In #004e00 the green part is the hex number 4e. What is it as a normal number?
- 29.🌈 Which colour is #0000ff? (a) red (b) cyan (c) black (d) blue
- 30.🌈 Which colour of light is strongest in rgb(4, 61, 245)? (a) green (b) blue (c) red
- 31.🌈 In #00b400 the green part is the hex number b4. What is it as a normal number?
- 32.🌈 Which colour is #000000? (a) magenta (b) blue (c) black (d) bright green
- 33.🌈 Which colour of light is strongest in rgb(186, 92, 47)? (a) red (b) green (c) blue
- 34.🌈 Which hex code is white? (a) #000000 (b) #ff0000 (c) #ffffff (d) #ff00ff
- 35.🌈 In #00004b the blue part is the hex number 4b. What is it as a normal number?
- 36.🌈 In #d50000 the red part is the hex number d5. What is it as a normal number?
- 37.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) yellow (c) bright green (d) red
- 38.🌈 Which colour is rgb(0, 255, 255)? (a) blue (b) yellow (c) magenta (d) cyan
- 39.🌈 Which colour is rgb(255, 0, 255)? (a) blue (b) red (c) yellow (d) magenta
- 40.🌈 In #810000 the red part is the hex number 81. What is it as a normal number?
Answer key
- 27
- 3
- green
- 194
- #ff0000
- 136
- blue
- blue
- 52
- green
- yellow
- red
- blue
- red
- 16
- yellow
- bright green
- white
- magenta
- 255
- red
- white
- bright green
- red
- #0000ff
- #00ff00
- F
- 78
- blue
- blue
- 180
- black
- red
- #ffffff
- 75
- 213
- red
- cyan
- magenta
- 129
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids