Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kingdutch/twig-hex-color-change-extension
https://github.com/kingdutch/twig-hex-color-change-extension
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kingdutch/twig-hex-color-change-extension
- Owner: Kingdutch
- License: mit
- Created: 2018-01-29T15:27:34.000Z (almost 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-01-29T15:29:30.000Z (almost 7 years ago)
- Last Synced: 2024-11-07T22:49:25.311Z (3 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# twig-hex-color-change-extension
Twig extension to lighten or darken a given hex value by 20%, or to shade it by a given %## Installation
Install via composer:
```
composer require mattgxyz/twig-hex-color-changeextension
```Add the following to your services.yml file:
```yaml
twig.extension.hexcolorchange:
class: MattgXyz\Twig\HexColorChangeExtension
tags:
- { name: twig.extension
```## Usage
```
{{ '#336699' | darken }}
{{ '#336699' | lighten }}
{{ '#336699' | shade(60) }}```