Class ColorTypes.HSV64
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.colors.LongColorType
dev.lukebemish.dynamicassetgenerator.api.colors.LongColorType.HueLongColorType
dev.lukebemish.dynamicassetgenerator.api.colors.ColorTypes.HSV64
- Enclosing class:
ColorTypes
Colors encoded with the least significant 64 bits representing 4 16-bit channels: alpha, hue, saturation, and
value.
-
Nested Class Summary
Nested classes/interfaces inherited from class dev.lukebemish.dynamicassetgenerator.api.colors.LongColorType
LongColorType.BlendingLongColorType, LongColorType.HueLongColorType -
Method Summary
Modifier and TypeMethodDescriptionprotected floatmakeChroma(long color) protected longmakeColor(int alpha, int hue, float chroma, float xMin, float xMax) Finalized encoding of a color given some parameters.protected floatmakeMatch(long color, float chroma) intsaturation(long color) intvalue(long color) Methods inherited from class dev.lukebemish.dynamicassetgenerator.api.colors.LongColorType.HueLongColorType
fromARGB64, hue, toARGB64
-
Method Details
-
saturation
@Contract(pure=true) public int saturation(long color) -
value
@Contract(pure=true) public int value(long color) -
makeChroma
protected float makeChroma(long color) - Specified by:
makeChromain classLongColorType.HueLongColorType- Returns:
- the chroma from 0 to 1 given a color
-
makeMatch
protected float makeMatch(long color, float chroma) - Specified by:
makeMatchin classLongColorType.HueLongColorType- Returns:
- what needs to be added to each 0 to 1 channel to provide the proper value, given a full color and chroma
-
makeColor
protected long makeColor(int alpha, int hue, float chroma, float xMin, float xMax) Description copied from class:LongColorType.HueLongColorTypeFinalized encoding of a color given some parameters.- Specified by:
makeColorin classLongColorType.HueLongColorType- Parameters:
alpha- alpha value, from 0x0000 to 0xFFFFhue- hue, from 0x0000 to 0xFFFFchroma- chroma, from 0 to 1xMin- minimum value of RGB channels, from 0 to 1xMax- maximum value of RGB channels, from 0 to 1- Returns:
- an encoded color
-