Color

@Stable
fun Color(red: Float, green: Float, blue: Float): Color

Creates a new Color instance from an RGB color components.

Return

A non-null instance of Color

Parameters

red

The red component of the color, between 0.0 and 1.0.

green

The green component of the color, between 0.0 and 1.0.

blue

The blue component of the color, between 0.0 and 1.0.


@Stable
fun Color(red: Int, green: Int, blue: Int): Color

Creates a new Color instance from an RGB color components.

Return

A non-null instance of Color

Parameters

red

The red component of the color, between 0 and 255.

green

The green component of the color, between 0 and 255.

blue

The blue component of the color, between 0 and 255.