HarmonyDetector

Detects color harmony patterns in palettes.

Analyzes the hue relationships between colors to identify
complementary, analogous, triadic, tetradic, or split-complementary harmonies.

Methods

public function detect(ColorPaletteInterface $palette, float $tolerance): array

Detect the harmony type in a palette.

Parameters
NameTypeDefault
$palette ColorPaletteInterface -
$tolerance float 25
public function isHarmony(ColorPaletteInterface $palette, HarmonyPattern|string $type, float $tolerance): bool

Check if a palette follows a specific harmony type.

Parameters
NameTypeDefault
$palette ColorPaletteInterface -
$type HarmonyPattern|string -
$tolerance float 25