namespace Tinkerforge
{
    public static class EColor
    {
        public static (int Red, int Green, int Blue, int Clear) GetColor(this BrickletColor color)
        {
            color.GetColor(out int r, out int g, out int b, out int c);
            return (r, g, b, c);
        }

        public static (byte Gain, byte IntegrationTime) GetConfig(this BrickletColor color)
        {
            color.GetConfig(out byte gain, out byte integrationTime);
            return (gain, integrationTime);
        }

        public static (char Option, int MinRed, int MaxRed, int MinGreen, int MaxGreen, int MinBlue, int MaxBlue, int
            MinClear, int maxClear) GetColorCallbackThreshold(this BrickletColor color)
        {
            color.GetColorCallbackThreshold(out char option, out int minR, out int maxR, out int minG, out int maxG,
                out int minB, out int maxB, out int minC, out int maxC);
            return (option, minR, maxR, minG, maxG, minB, maxB, minC, maxC);
        }
    }
}
