int[] (Color color) { ColorSpace genericRgbSpace; if (SystemInfo.isMac && (genericRgbSpace = MacColorSpaceLoader.getGenericRgbColorSpace()) != null) { // on macOS color components are expected in Apple's 'Generic RGB' color space float[] components = genericRgbSpace.fromRGB(color.getRGBColorComponents(null)); return new int[]{ colorComponentFloatToInt(components[0]), colorComponentFloatToInt(components[1]), colorComponentFloatToInt(components[2]) }; } else { return new int[]{color.getRed(), color.getGreen(), color.getBlue()}; } }