mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-24 02:11:05 +00:00
e197c7b29d
To sort an image's colors from darkest to lightest, you can then do: ```handlebars {{ {{ $colorsByLuminance := sort $image.Colors "Luminance" }} ``` This uses the formula defined here: https://www.w3.org/TR/WCAG21/#dfn-relative-luminance Fixes #10450 |
||
---|---|---|
.. | ||
assets | ||
images | ||
internal | ||
jsconfig | ||
kinds | ||
page | ||
postpub | ||
resource | ||
resource_factories | ||
resource_transformers | ||
testdata | ||
docs.go | ||
errorResource.go | ||
image.go | ||
image_cache.go | ||
image_extended_test.go | ||
image_test.go | ||
post_publish.go | ||
resource.go | ||
resource_cache.go | ||
resource_metadata.go | ||
resource_spec.go | ||
resource_spec_test.go | ||
resources_integration_test.go | ||
testhelpers_test.go | ||
transform.go | ||
transform_integration_test.go | ||
transform_test.go |