ColorOKHSVa

@Serializable
data class ColorOKHSVa(val h: Double, val s: Double, val v: Double, val alpha: Double = 1.0) : ColorModel<ColorOKHSVa> , HueShiftableColor<ColorOKHSVa> , SaturatableColor<ColorOKHSVa> , ShadableColor<ColorOKHSVa> , AlgebraicColor<ColorOKHSVa> (source)

Represents a color in the OKHSVa color model.

The OKHSVa color model is derived from OKLABa and provides a perceptually uniform representation of colors using hue (h), saturation (s), value (v), and alpha (opacity).

This class supports operations and transformations such as conversion to and from RGBa, hue shifting, saturation adjustment, shading, and algebraic operations like addition, subtraction, and scaling. It is ideal for working with colors in contexts requiring accurate color mixing and perceptual results.

Constructors

Link copied to clipboard
constructor(h: Double, s: Double, v: Double, alpha: Double = 1.0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val alpha: Double

Opacity value (0.0 - 1.0), with 1.0 being fully opaque.

Link copied to clipboard
val h: Double

Hue value in degrees (0.0 - 360.0), representing the color's angle on the color wheel.

Link copied to clipboard
open override val hue: Double
Link copied to clipboard
val s: Double

Saturation value (0.0 - 1.0), representing the intensity or purity of the color.

Link copied to clipboard
open override val saturation: Double
Link copied to clipboard
val v: Double

Value (0.0 - 1.0), representing the color's brightness.

Functions

Link copied to clipboard
open operator override fun div(scale: Double): ColorOKHSVa
Link copied to clipboard
open operator override fun minus(right: ColorOKHSVa): ColorOKHSVa
Link copied to clipboard
open override fun mix(other: ColorOKHSVa, factor: Double): ColorOKHSVa
Link copied to clipboard
open fun mixHue(hue: Double, factor: Double): ColorOKHSVa
Link copied to clipboard
open fun mixSaturation(saturation: Double, factor: Double): ColorOKHSVa
Link copied to clipboard
open override fun opacify(factor: Double): ColorOKHSVa
Link copied to clipboard
open operator override fun plus(right: ColorOKHSVa): ColorOKHSVa
Link copied to clipboard
operator fun ConvertibleToColorRGBa.rangeTo(end: ConvertibleToColorRGBa): ColorSequence

Defines a range between two colors by creating a sequence of colors that transition smoothly from the start color to the end color.

Link copied to clipboard
open fun saturate(factor: Double): ColorOKHSVa
Link copied to clipboard
open override fun shade(factor: Double): ColorOKHSVa
Link copied to clipboard
open fun shiftHue(shiftInDegrees: Double): ColorOKHSVa
Link copied to clipboard
open operator override fun times(scale: Double): ColorOKHSVa
Link copied to clipboard
open override fun toRGBa(): ColorRGBa
Link copied to clipboard
open override fun toVector4(): Vector4
Link copied to clipboard
open override fun withHue(hue: Double): ColorOKHSVa
Link copied to clipboard
open override fun withSaturation(saturation: Double): ColorOKHSVa