hugo/resources
Bjørn Erik Pedersen e197c7b29d Add Luminance to Color
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
2024-04-16 10:02:46 +02:00
..
assets
images Add Luminance to Color 2024-04-16 10:02:46 +02:00
internal
jsconfig
kinds
page Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
postpub
resource
resource_factories
resource_transformers babel: Run go fmt 2024-04-08 18:28:04 +02:00
testdata
docs.go
errorResource.go Add Luminance to Color 2024-04-16 10:02:46 +02:00
image.go Add Luminance to Color 2024-04-16 10:02:46 +02:00
image_cache.go
image_extended_test.go
image_test.go Add Luminance to Color 2024-04-16 10:02:46 +02:00
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 Add Luminance to Color 2024-04-16 10:02:46 +02:00
transform_integration_test.go
transform_test.go