use of com.bwssystems.HABridge.hue.ColorData in project ha-bridge by bwssytems.
the class ConvertCIEColorTestCase method testColorConversionXYtoRGB2.
@Test
public void testColorConversionXYtoRGB2() {
ArrayList<Double> xy = new ArrayList<Double>(Arrays.asList(Double.parseDouble("0.32312"), Double.parseDouble("0.15539")));
List<Integer> colorDecode = ColorDecode.convertCIEtoRGB(xy, 59);
List<Integer> assertDecode = new ArrayList<Integer>();
assertDecode.add(0, 233);
assertDecode.add(1, 0);
assertDecode.add(2, 231);
Assert.assertEquals(colorDecode, assertDecode);
ColorData colorData = new ColorData(ColorData.ColorMode.XY, xy);
int rgbIntVal = ColorDecode.getIntRGB(colorData, 59);
Assert.assertEquals(rgbIntVal, 15270119);
}
Aggregations