A utility class with helper functions for color conversion.
ColorConverter is an addon, and must be imported explicitly, see Installation#Addons.
import { ColorConverter } from 'three/addons/math/ColorConverter.js';Returns a HSV color representation of the given color object.
color
The color to get HSV values from.
target
The target object that is used to store the method's result.
Returns: The HSV color.
Returns an OKLCH color representation of the given color object.
color
The color to get OKLCH values from.
target
The target object that is used to store the method's result.
Returns: The OKLCH color.
Sets the given HSV color definition to the given color object.
color
The color to set.
h
The hue.
s
The saturation.
v
The value.
Returns: The update color.
Sets the given OKLCH color definition to the given color object.
color
The color to set.
l
The lightness.
c
The chroma.
h
The hue.
Returns: The updated color.