Interface ModeledColor<C extends 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 Enum<C> & ModeledColor.Component> extends Color
Representation of a color through use of a color color space model.
Author:
Garret Wilson
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The color component used in the color space.
  • Method Summary

    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.

    Methods inherited from interface io.guise.framework.style.Color

    asHSL, asRGB
  • Method Details

    • 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: