*/
@NonNullByDefault
public class ColorValue extends Value {
+ private static BigDecimal factor = new BigDecimal("2.55"); // string to not lose precision
+
private final Logger logger = LoggerFactory.getLogger(ColorValue.class);
private final ColorMode colorMode;
}
}
- private static BigDecimal factor = new BigDecimal(2.5);
-
/**
* Converts the color state to a string.
*
c.processMessage("state", "12,18,231".getBytes());
assertThat(value.getChannelState(), is(t)); // HSB
// rgb -> hsv -> rgb is quite lossy
- assertThat(value.getMQTTpublishValue(null), is("13,20,225"));
- assertThat(value.getMQTTpublishValue("%3$d,%2$d,%1$d"), is("225,20,13"));
+ assertThat(value.getMQTTpublishValue(null), is("13,20,229"));
+ assertThat(value.getMQTTpublishValue("%3$d,%2$d,%1$d"), is("229,20,13"));
}
@Test