TopShelfCraft / Hue

A slightly better color picker for CraftCMS
MIT License
34 stars 4 forks source link

Luma method #9

Closed aaronwaldon closed 7 years ago

aaronwaldon commented 7 years ago

Can be used to determine the lightness or darkness of a color. For example, to assign a class in a twig template based on a Hue color value assigned to a color variable, something like the following could be used: color.luma > 0.7 ? 'bg--light' : 'bg--dark'

michaelrog commented 7 years ago

This is great — thank you! Will you PR it to the dev branch plz?

aaronwaldon commented 7 years ago

There ye be.