Documentation
¶
Overview ¶
Package imagecolours provides shared helpers for extracting colour palettes from images and saving generation metadata. Used by AI input plugins.
Index ¶
Constants ¶
View Source
const ( // MainColorWeightRatio is the proportion of total weight allocated to // main palette colors when region extraction is enabled (90%). MainColorWeightRatio = 0.9 // RegionWeightFactor determines how much weight region colors receive // relative to main palette colors. Region colors get 10% of the total weight. RegionWeightFactor = 0.1 )
Variables ¶
This section is empty.
Functions ¶
func ExtractColors ¶
ExtractColors extracts a colour palette from the image at imagePath. It honours all commonflags settings (seed mode, colour count, region extraction).
func SaveMetadata ¶
SaveMetadata saves generation metadata as a JSON file alongside the image. metadata may be any JSON-serialisable value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.