|
| 1 | +/* |
| 2 | + * Copyright 2018 ImpactDevelopment |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package clientapi.value; |
| 18 | + |
| 19 | +import pw.knx.feather.structures.Color; |
| 20 | + |
| 21 | +/** |
| 22 | + * @author Brady |
| 23 | + * @since 9/27/2018 |
| 24 | + */ |
| 25 | +public interface IColorValue extends IValue<Color> { |
| 26 | + |
| 27 | + default float getRed() { |
| 28 | + return this.getValue().getRed(); |
| 29 | + } |
| 30 | + |
| 31 | + default float getGreen() { |
| 32 | + return this.getValue().getGreen(); |
| 33 | + } |
| 34 | + |
| 35 | + default float getBlue() { |
| 36 | + return this.getValue().getBlue(); |
| 37 | + } |
| 38 | + |
| 39 | + default float getHue() { |
| 40 | + return this.getValue().getHue(); |
| 41 | + } |
| 42 | + |
| 43 | + default float getSaturation() { |
| 44 | + return this.getValue().getSaturation(); |
| 45 | + } |
| 46 | + |
| 47 | + default float getBrightness() { |
| 48 | + return this.getValue().getBrightness(); |
| 49 | + } |
| 50 | + |
| 51 | + default int getHex() { |
| 52 | + return this.getValue().getHex(); |
| 53 | + } |
| 54 | +} |
0 commit comments