Package-level declarations

Types

Link copied to clipboard
class ColorSequence(val colors: List<Pair<Double, ConvertibleToColorRGBa>>)

Represents a sequence of colors along with their corresponding positions in a normalized range 0.0, 1.0. The ColorSequence allows for creating interpolated colors between the specified color points.

Functions

Link copied to clipboard
inline fun <T : HueShiftableColor<T>, ColorModel<T>> ColorRGBa.analogous(hueShift: Double, steps: Int = 5): List<ColorRGBa>

Generates an analogous color palette based on the current color.

Link copied to clipboard
fun <T : ConvertibleToColorRGBa> colorSequence(vararg offsets: Pair<Double, T>): ColorSequence

Creates a ColorSequence by accepting a variable number of pairs, where each pair consists of a position (Double) and a color (T). The positions represent the normalized range [0.0, 1.0]. The resulting ColorSequence can be used for creating interpolated colors between the specified positions.

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
inline fun <T : HueShiftableColor<T>, ColorModel<T>> ColorRGBa.splitComplementary(splitFactor: Double, double: Boolean = false): List<ColorRGBa>

Generates a split complementary color palette based on the current ColorRGBa.

Link copied to clipboard
inline fun <T : HueShiftableColor<T>, ColorModel<T>> ColorRGBa.tetradic(aspectRatio: Double = 1.0): List<ColorRGBa>

Generates a tetradic color scheme based on the current color. A tetradic color scheme consists of four colors that are equidistant on the color wheel.

Link copied to clipboard
inline fun <T : HueShiftableColor<T>, ColorModel<T>> ColorRGBa.triadic(): List<ColorRGBa>

Generates a triadic color palette based on the current ColorRGBa.