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 Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
images
internal
jsconfig
kinds all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page Pass .RenderShortcodes' Page to render hooks as .PageInner 2024-04-15 09:49:57 +02:00
postpub
resource Fix Name for nested resourced fetched in resources.ByName and similar 2024-03-13 18:59:50 +02:00
resource_factories resources: Use different cache key when copying resources 2024-03-27 09:59:59 +01:00
resource_transformers
testdata Add images.Opacity filter 2023-09-22 15:03:16 +02:00
docs.go
errorResource.go
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 Fix rebuild with resources.Concat 2024-02-16 13:17:53 +01:00
resource_metadata.go resource: Revert the normalization of Resource.Name 2024-02-25 14:57:29 +01:00
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 all: Fix typos and some URLs 2024-02-18 12:16:30 +01:00