Package crackers.kobots.parts
Class GraphicsKt
-
- All Implemented Interfaces:
public final class GraphicsKt
-
-
Method Summary
Modifier and Type Method Description final ColorgetPURPLE()final ColorgetGOLDENROD()final ColorgetORANGISH()final static List<Color>colorInterval(Color from, Color to, Integer steps)Note this only extracts the HSB hue component of the color. final static List<Color>colorIntervalFromHSB(Float angleFrom, Float angleTo, Integer n)Generate a range of n colors based on the HSB hue (0==red) angleFrom to angleTo final static <Error class: unknown class>scale(Color $self, Integer percent)Scale (or brighten/dim) a color by a percentage (1-100). final static <Error class: unknown class>colorLimit(Double $self)final static <Error class: unknown class>colorLimit(Integer $self)final static ColorkelvinToRGB(Integer $self)Convert a temperature in Kelvin to an RGB color. final static IntegertoKelvin(Color $self)Convert a color to a Kelvin temperature. final static <Error class: unknown class>squared(Integer $self)final static IntegertoMireds(Color $self)Additional math to convert to mired values. final static ColormiredsToColor(Integer $self)final static DoubletoLuminance(Color $self)final static DoubletoLuminancePerceived(Color $self)final static <Error class: unknown class>toLuminancePerceived2(Color $self)-
-
Method Detail
-
getGOLDENROD
final Color getGOLDENROD()
-
getORANGISH
final Color getORANGISH()
-
colorInterval
final static List<Color> colorInterval(Color from, Color to, Integer steps)
Note this only extracts the HSB hue component of the color.
-
colorIntervalFromHSB
final static List<Color> colorIntervalFromHSB(Float angleFrom, Float angleTo, Integer n)
Generate a range of n colors based on the HSB hue (0==red) angleFrom to angleTo
-
scale
final static <Error class: unknown class> scale(Color $self, Integer percent)
Scale (or brighten/dim) a color by a percentage (1-100).
-
colorLimit
final static <Error class: unknown class> colorLimit(Double $self)
-
colorLimit
final static <Error class: unknown class> colorLimit(Integer $self)
-
kelvinToRGB
final static Color kelvinToRGB(Integer $self)
Convert a temperature in Kelvin to an RGB color. THIS IS NOT ACCURATE!!!
This is based on the algorithm from https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html Note that round-tripping between this and the inverse function does not work.
-
toKelvin
final static Integer toKelvin(Color $self)
Convert a color to a Kelvin temperature. THIS IS NOT ACCURATE!!!
Note that round-tripping between this and the inverse function does not work.
-
miredsToColor
final static Color miredsToColor(Integer $self)
-
toLuminance
final static Double toLuminance(Color $self)
-
toLuminancePerceived
final static Double toLuminancePerceived(Color $self)
-
toLuminancePerceived2
final static <Error class: unknown class> toLuminancePerceived2(Color $self)
-
-
-
-