Skip to content

Color

data class Color(
    val r: Double, 
    val g: Double, 
    val b: Double, 
    val a: Double
) : GPUColor
An RGBA color represented by four components. See [GPUColor in the WebGPU specification](https://www.w3.org/TR/webgpu/#typedefdef-gpucolor).

Constructors

Color

constructor(
    r: Double, 
    g: Double, 
    b: Double, 
    a: Double
)

Properties

a

open override val a: Double
The alpha channel value. See [GPUColor.a in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpucolordict-a).

b

open override val b: Double
The blue channel value. See [GPUColor.b in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpucolordict-b).

g

open override val g: Double
The green channel value. See [GPUColor.g in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpucolordict-g).

r

open override val r: Double
The red channel value. See [GPUColor.r in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpucolordict-r).