Package-level declarations

Types

Link copied to clipboard
sealed class ColorSpace

Represents the color space of a KutintColor.

Link copied to clipboard
data class HSL(val h: Float, val s: Float, val l: Float, val alpha: Float = 1.0f) : KutintColor<HSLColorSpace>

Represents a color in the HSL color space.

Link copied to clipboard

Represents the HSL color space.

Link copied to clipboard
sealed class KutintColor<T : ColorSpace> : CSSColorValue

Base class for all color types supported by Kutint. See RGB and HSL for specific implementations.

Link copied to clipboard
data class RGB(val r: Float, val g: Float, val b: Float, val alpha: Float = 1.0f) : KutintColor<RGBColorSpace>

Represents a color in the RGB color space.

Link copied to clipboard

Represents the RGB color space.

Functions

Link copied to clipboard
fun hsla(h: Number, s: Number, l: Number, alpha: Number = 1.0f): HSL

Utility function for creating an HSL color from HSL values.

Link copied to clipboard
fun parseHex(hex: String): RGB

Utility function for creating an RGB color from a hex string.

fun parseHex(color: Int, hasAlpha: Boolean = false): RGB

Utility function for creating an RGB color from an Int (e.g., 0xFF0000).

Link copied to clipboard
fun rgba(r: Number, g: Number, b: Number, alpha: Number = 1.0f): RGB

Utility function for creating an RGB color from RGB values.