Skip to content

matthewgarrettks/twig-hex-color-change

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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:

  twig.extension.hexcolorchange:
    class: MattgXyz\Twig\HexColorChangeExtension
    tags:
        - { name: twig.extension 

Usage

{{ '#336699' | darken }}
{{ '#336699' | lighten }}
{{ '#336699' | shade(60) }}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages