#FF0000 можно сократить до #F00 . Эта сокращенная форма дает одну цифру для красного, одну цифру для зеленого и одну цифру для синего. Это уменьшает общее количество возможных цветов примерно до 4000. Но браузеры будут интерпретировать #FF0000 и #F00 как точно такой же цвет. | цвет | Короткие шестнадцатеричные коды |
|---|---|
| Cyan | #0FF |
| зеленый | #0F0 |
| красный | #F00 |
| фуксия | #F0F |
h1 текст, который I am red! color красный.'
testString: 'assert($(".red-text").css("color") === "rgb(255, 0, 0)", "Give your h1 element with the text I am red! the color red.");'
- text: 'Используйте сокращенный hex code для красного цвета вместо шестнадцатеричного кода #FF0000 .'
testString: 'assert(code.match(/\.red-text\s*?{\s*?color:\s*?#F00\s*?;\s*?}/gi), "Use the abbreviate hex code for the color red instead of the hex code #FF0000.");'
- text: 'Дайте вашему элементу h1 текст, который I am green! color зеленый.'
testString: 'assert($(".green-text").css("color") === "rgb(0, 255, 0)", "Give your h1 element with the text I am green! the color green.");'
- text: 'Используйте сокращенный hex code для зеленого цвета вместо шестнадцатеричного кода #00FF00 .'
testString: 'assert(code.match(/\.green-text\s*?{\s*?color:\s*?#0F0\s*?;\s*?}/gi), "Use the abbreviated hex code for the color green instead of the hex code #00FF00.");'
- text: 'Дайте вашему элементу h1 текст, который I am cyan! color голубой.'
testString: 'assert($(".cyan-text").css("color") === "rgb(0, 255, 255)", "Give your h1 element with the text I am cyan! the color cyan.");'
- text: 'Используйте сокращенный hex code для цвета cyan вместо шестнадцатеричного кода #00FFFF .'
testString: 'assert(code.match(/\.cyan-text\s*?{\s*?color:\s*?#0FF\s*?;\s*?}/gi), "Use the abbreviated hex code for the color cyan instead of the hex code #00FFFF.");'
- text: 'Дайте вашему элементу h1 текст, который I am fuchsia! color фуксии.'
testString: 'assert($(".fuchsia-text").css("color") === "rgb(255, 0, 255)", "Give your h1 element with the text I am fuchsia! the color fuchsia.");'
- text: 'Используйте сокращенный hex code для цветной фуксии вместо шестнадцатеричного кода #FF00FF .'
testString: 'assert(code.match(/\.fuchsia-text\s*?{\s*?color:\s*?#F0F\s*?;\s*?}/gi), "Use the abbreviated hex code for the color fuchsia instead of the hex code #FF00FF.");'
```