Package io.guise.framework.style
Interface ModeledColor<C extends java.lang.Enum<C> & ModeledColor.Component>
-
- Type Parameters:
C
- The type of color component for this color space.
- All Superinterfaces:
Color
- All Known Implementing Classes:
AbstractModeledColor
,HSLColor
,RGBColor
public interface ModeledColor<C extends java.lang.Enum<C> & ModeledColor.Component> extends Color
Representation of a color through use of a color color space model.- Author:
- Garret Wilson
- See Also:
- Color Space FAQ, International Color Consortium
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ModeledColor.Component
The color component used in the color space.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getAbsoluteComponent(C component, int bitDepth)
Determines the absolute value of the given color component with the given bit depth.double
getComponent(C component)
Determines the value of the given color component.
-
-
-
Method Detail
-
getComponent
double getComponent(C component)
Determines the value of the given color component.- Parameters:
component
- The color component for which a value should be retrieved.- Returns:
- The value of the requested color component.
-
getAbsoluteComponent
long getAbsoluteComponent(C component, int bitDepth)
Determines the absolute value of the given color component with the given bit depth. For example, retrieving a component with value 0.5 and a bit depth of 16 would produce 128 or 0x80.- Parameters:
component
- The color component for which a value should be retrieved.bitDepth
- The number of bits to use for the given color component.- Returns:
- The absolute value of the requested color component at the given bit depth.
- See Also:
getComponent(Enum)
-
-