ColourSample

data class ColourSample(val closestSwatch: PredominantColorProcessor.Swatch, val rgb: Int, val red: Int, val green: Int, val blue: Int) : VisionData

Data class for storing data related to the return results of a PredominantColorProcessor. This data class will only have one instance affixed to the corresponding ColourSensor.

Since

5.0.0

Constructors

Link copied to clipboard
constructor(closestSwatch: PredominantColorProcessor.Swatch, rgb: Int)
constructor(closestSwatch: PredominantColorProcessor.Swatch, rgb: Int, red: Int, green: Int, blue: Int)

Properties

Link copied to clipboard
val blue: Int

The exact Blue RGB component of the dominant colour within the Region of Interest.

Link copied to clipboard
val closestSwatch: PredominantColorProcessor.Swatch

The "best guess" at the general shade of the dominant colour in the Region of Interest.

Link copied to clipboard
val green: Int

The exact Green RGB component of the dominant colour within the Region of Interest.

Link copied to clipboard
val red: Int

The exact Red RGB component of the dominant colour within the Region of Interest.

Link copied to clipboard
val rgb: Int

The exact numerical value of the dominant colour in the Region of Interest.