[http] Fix parsing of Color RGB values (#10897)

* Fixed parsing of Color RGB values

Signed-off-by: Ryz <mirco.heitmann@gmail.com>
This commit is contained in:
Ryz 2021-06-22 12:51:16 +02:00 committed by GitHub
parent cba49df16a
commit 58c7928b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -109,9 +109,9 @@ public class ColorItemConverter extends AbstractTransformingItemConverter {
if (matcher.matches()) { if (matcher.matches()) {
switch (channelConfig.colorMode) { switch (channelConfig.colorMode) {
case RGB: case RGB:
int r = Integer.parseInt(matcher.group(0)); int r = Integer.parseInt(matcher.group(1));
int g = Integer.parseInt(matcher.group(1)); int g = Integer.parseInt(matcher.group(2));
int b = Integer.parseInt(matcher.group(2)); int b = Integer.parseInt(matcher.group(3));
newState = HSBType.fromRGB(r, g, b); newState = HSBType.fromRGB(r, g, b);
break; break;
case HSB: case HSB: