resources/images: Add $image.Colors

Which returns the most dominant colors of an image using a simple histogram method.

Fixes #10307
This commit is contained in:
Bjørn Erik Pedersen
2022-09-21 16:24:54 +02:00
parent 08f0984f91
commit a4028112e3
10 changed files with 90 additions and 0 deletions

2
go.mod
View File

@@ -91,6 +91,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/sso v1.4.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.7.0 // indirect
github.com/aws/smithy-go v1.8.0 // indirect
github.com/cenkalti/dominantcolor v1.0.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
@@ -108,6 +109,7 @@ require (
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect
github.com/marekm4/color-extractor v1.2.0 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect