com.qualcomm.robotcore.hardware

## Interface ColorSensor

- All Superinterfaces:
    HardwareDevice

      public interface ColorSensor
      extends HardwareDevice

  Color Sensor

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `HardwareDevice.Manufacturer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `alpha()` Get the amount of light detected by the sensor as an int.
    `int` | `argb()` Get the "hue"
    `int` | `blue()` Get the Blue values detected by the sensor as an int.
    `void` | `enableLed(boolean enable)` Enable the LED light
    `I2cAddr` | `getI2cAddress()` Get the current I2C Address of this object.
    `int` | `green()` Get the Green values detected by the sensor as an int.
    `int` | `red()` Get the Red values detected by the sensor as an int.
    `void` | `setI2cAddress(I2cAddr newAddress)` Set the I2C address to a new value.

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode`

- - ### Method Detail

    - #### red

          int red()

      Get the Red values detected by the sensor as an int.
      Returns:
        reading, unscaled.

    - #### green

          int green()

      Get the Green values detected by the sensor as an int.
      Returns:
        reading, unscaled.

    - #### blue

          int blue()

      Get the Blue values detected by the sensor as an int.
      Returns:
        reading, unscaled.

    - #### alpha

          int alpha()

      Get the amount of light detected by the sensor as an int.
      Returns:
        reading, unscaled.

    - #### argb

          int argb()

      Get the "hue"
      Returns:
        hue

    - #### enableLed

          void enableLed(boolean enable)

      Enable the LED light
      Parameters:
        `enable` - true to enable; false to disable

    - #### setI2cAddress

          void setI2cAddress(I2cAddr newAddress)

      Set the I2C address to a new value.

    - #### getI2cAddress

          I2cAddr getI2cAddress()

      Get the current I2C Address of this object. Not necessarily the same as the I2C address of the actual device. Return the current I2C address.
      Returns:
        current I2C address