NextColor

data class NextColor(val red: Float, val green: Float, val blue: Float)

Stores a color. Use rgb if you have red, green, and blue values, or hsv if you have hue, saturation, and brightness values.

You can use the NextColorDistanceSensor.debug to find these values. Reccomened to use hsv for most cases. Example:

val lime = NextColor.HSV(100f, 0.9f, 0.85f)
val sameColor = NextColor.RGB(lime.red, lime.green, lime.blue)

Author

28shettr

Constructors

Link copied to clipboard
constructor(red: Float, green: Float, blue: Float)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val blue: Float
Link copied to clipboard
Link copied to clipboard

The color as a [hue, saturation, value] float array (hue: 0–360, saturation/value: 0–1).

Link copied to clipboard
val red: Float
Link copied to clipboard

The color as a [red, green, blue] float array (0–255).