public class Colors extends Object
Colors
is a BBj Custom Class that provides commonly-used routines to convert
and format colors in a variety of models including Java Color, BBjColor, and RGB, HSL, HSB, and hexadecimal representation.
Note that most of the methods are static, meaning that you don't have to instantiate a custom object in order to use the class. For example:
myBBjColor! = Colors.getBBjColorFromHexString("#fafbfc")
Most color representations support a built-in alpha channel and the conversion will take that into account. For backward compatibility with older systems, hex color strings and formatted HSLA strings are returned without the alpha digits when the alpha channel is fully opaque.
There are a variety of ways to specify a hexadecimal color, including standard and shorthand notation, with or without an octothorpe (#), and with or without an alpha component:
#rrggbb
- standard representation, prefixed by an octothorpe (the pound sign) with two hex digits for the red, green, and blue (RGB) channels rrggbb
- standard representation without the octothorpe with two hex digits for the RGB channels #rgb
- shorthand representation with 1 hexadecimal digit that will be doubled for the RGB channels, e.g. #f0c = #ff00cc
rgb
- shorthand representation without the octothorpe with 1 hexadecimal digit that will be doubled for the RGB channels, e.g. #f0c = #ff00cc
#rrggbbaa
- standard representation with two hex digits for the red, green, blue, and alpha (RGBA) channels rrggbbaa
- standard representation without the octothorpe with two hex digits for the RGBA channels #rgba
- shorthand representation with 1 hexadecimal digit that will be doubled for the RGBA channels, e.g. #f0c8 = #ff00cc88
rgba
- shorthand representation without the octothorpe with 1 hexadecimal digit that will be doubled for the RGBA channels, e.g. #f0c8 = #ff00cc88
For all Hue, Saturation, Lightness, and Alpha methods, all parameters are floating point number with the following numerical ranges:
For all Hue, Saturation, Brightness, and Alpha methods, all parameters are floating point number with the following numerical ranges:
Comparing HSL and HSB Color Models:
HSB is the same color model as HSV, where the last letter stands for Brightness or Value and resolve to the same value. HSB differs from HSL, even
though we typically think of Lightness and Brightness as the same thing. In the HSL color model the Saturation ranges from grey to full color, and
the Lightness ranges from black (0) to full color (0.5) to white (1). In the HSB color model the Saturation ranges from white to full color, and
the Brightness ranges from black to full color.
THROW
n Error Codes:
313
: Invalid color specified. The specified string for a hex color description was invalid. It should be in a format like #fafbfc
, or #f0c
, or #fafbfc80
, or #f0cc
.314
: Invalid BBjVector of HSLA or HSBA values provided.
315
: Invalid hex value provided.
316
: Invalid decimal value provided.
ToDo:
color manipulation: darken, lighten, saturate, desaturate
color blending
Constructor and Description |
---|
Colors() |
Modifier and Type | Method and Description |
---|---|
static BBjColor |
getBBjColorFromHexString(BBjString p_colorHexString$)
Method to create a BBjColor from a hex color string
|
static BBjColor |
getBBjColorFromHSBAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_brightness,
BBjNumber p_alpha)
Method to create a BBjColor from its corresponding HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) discrete values
|
static BBjColor |
getBBjColorFromHSBAValues(BBjVector p_values!)
Method to create a BBjColor from its corresponding HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) values in a vector
|
static BBjColor |
getBBjColorFromHSLAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness,
BBjNumber p_alpha)
Method to create a BBjColor from its corresponding HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) discrete values
|
static BBjColor |
getBBjColorFromHSLAValues(BBjVector p_values!)
Method to create a BBjColor from its corresponding HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) values in a vector
|
static BBjColor |
getBBjColorFromJavaColor(Color p_color!)
Method to create a BBjColor from a Java Color with an alpha channel
|
static BBjNumber |
getDecimalFromHex(BBjString p_hexValue$)
Method to convert 2-digit hexadecimal number to a decimal number in the range from 0-255
|
static BBjString |
getHexFromDecimal(BBjNumber p_decimalValue)
Method to convert a decimal number to a hexadecimal number
|
static BBjString |
getHexStringFromBBjColor(BBjColor p_color!)
Method to get a hexadecimal color from a BBjColor
|
static BBjString |
getHexStringFromFromHSBAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_brightness,
BBjNumber p_alpha)
Method to create a hexadecimal color from its corresponding HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) discrete values
|
static BBjString |
getHexStringFromFromHSBAValues(BBjVector p_values!)
Method to create a hexadecimal color from its corresponding HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) values in a vector
|
static BBjString |
getHexStringFromFromHSLAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness,
BBjNumber p_alpha)
Method to create a hexadecimal color from its corresponding HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) discrete values
|
static BBjString |
getHexStringFromFromHSLAValues(BBjVector p_values!)
Method to create a hexadecimal color from its corresponding HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) values in a vector
|
static BBjString |
getHexStringFromJavaColor(Color p_color!)
Method to get a hex representation of a Java Color
|
static BBjString |
getHSBAStringFromBBjColor(BBjColor p_color!)
Method to format a BBjColor into an HSBA string in the format
hsba(h, s%, b%, a) |
static BBjString |
getHSBAStringFromHexString(BBjString p_colorHexString$)
Method to format a hex color string into an HSBA string in the format
hsba(h, s%, b%, a) |
static BBjString |
getHSBAStringFromHSBAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_brightness,
BBjNumber p_alpha)
Method to format individual HSBA values into an HSBA string in the format
hsba(h, s%, b%, a) |
static BBjString |
getHSBAStringFromHSBAValues(BBjVector p_values!)
Method to format a BBjVector of individual HSBA values into an HSBA string in the format
hsba(h, s%, b%, a) |
static BBjString |
getHSBAStringFromHSLAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness,
BBjNumber p_alpha)
Method to format individual HSLA values into an HSBA string in the format
hsba(h, s%, b%, a) |
static BBjString |
getHSBAStringFromHSLAValues(BBjVector p_values!)
Method to format a BBjVector of individual HSLA values into an HSBA string in the format
hsba(h, s%, b%, a) |
static BBjString |
getHSBAStringFromJavaColor(Color p_color!)
Method to format a Java Color into an HSBA string in the format
hsba(h, s%, b%, a) |
static BBjVector |
getHSBAValuesFromBBjColor(BBjColor p_color!)
Method to convert a BBjColor to its corresponding HSLA (Hue, Saturation, Brightness, and Alpha) values and return an array containing the 4 HSBA parameters of the BBjColor
|
static BBjVector |
getHSBAValuesFromHexString(BBjString p_colorHexString$)
Method to convert a hex color to its corresponding HSBA (Hue, Saturation, Brightness or sometimes Value, and Alpha) values and return an array containing the 4 HSBA parameters of the hex color
|
static BBjVector |
getHSBAValuesFromHSLAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness,
BBjNumber p_alpha)
Method to get a vector of HSBA values from HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) discrete values
|
static BBjVector |
getHSBAValuesFromHSLAValues(BBjVector p_values!)
Method to get a vector of HSBA values from HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) values in a vector
|
static BBjVector |
getHSBAValuesFromJavaColor(Color p_color!)
Method to convert a Java Color to its corresponding HSLA (Hue, Saturation, Brightness, and Alpha) values and return an array containing the 4 HSBA parameters of the Java Color
|
static BBjString |
getHSBStringFromBBjColor(BBjColor p_color!)
Method to format a BBjColor into an HSB string in the format
hsb(h, s%, b%) |
static BBjString |
getHSBStringFromHexString(BBjString p_colorHexString$)
Method to format a hex color string into an HSB string in the format
hsb(h, s%, b%) |
static BBjString |
getHSBStringFromHSBValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_brightness)
Method to format individual HSB values into an HSB string in the format
hsb(h, s%, b%) |
static BBjString |
getHSBStringFromHSBValues(BBjVector p_values!)
Method to format a BBjVector of individual HSB values into an HSB string in the format
hsb(h, s%, b%) |
static BBjString |
getHSBStringFromHSLValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness)
Method to format individual HSL values into an HSB string in the format
hsb(h, s%, b%) |
static BBjString |
getHSBStringFromHSLValues(BBjVector p_values!)
Method to format a BBjVector of individual HSL values into an HSB string in the format
hsb(h, s%, b%) |
static BBjString |
getHSBStringFromJavaColor(Color p_color!)
Method to format a Java Color into an HSB string in the format
hsb(h, s%, b%) |
static BBjString |
getHSLAStringFromBBjColor(BBjColor p_color!)
Method to format a BBjColor into an HSLA string in the format
hsla(h, s%, l%, a) |
static BBjString |
getHSLAStringFromHexString(BBjString p_colorHexString$)
Method to format a hex color string into an HSLA string in the format
hsla(h, s%, l%, a) |
static BBjString |
getHSLAStringFromHSBAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_brightness,
BBjNumber p_alpha)
Method to format individual HSBA values into an HSLA string in the format
hsla(h, s%, l%, a) |
static BBjString |
getHSLAStringFromHSBAValues(BBjVector p_values!)
Method to format a BBjVector of individual HSBA values into an HSLA string in the format
hsla(h, s%, l%, a) |
static BBjString |
getHSLAStringFromHSLAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness,
BBjNumber p_alpha)
Method to format individual HSLA values into an HSLA string in the format
hsla(h, s%, l%, a) |
static BBjString |
getHSLAStringFromHSLAValues(BBjVector p_values!)
Method to format a BBjVector of individual HSLA values into an HSLA string in the format
hsla(h, s%, l%, a) |
static BBjString |
getHSLAStringFromJavaColor(Color p_color!)
Method to format a Java Color into an HSLA string in the format
hsla(h, s%, l%, a) |
static BBjVector |
getHSLAValuesFromBBjColor(BBjColor p_color!)
Method to convert a BBjColor to its corresponding HSLA (Hue, Saturation, Lightness, and Alpha which is typically used in CSS) values and return an array containing the 4 HSLA parameters of the BBjColor
|
static BBjVector |
getHSLAValuesFromHexString(BBjString p_colorHexString$)
Method to convert a hex color to its corresponding HSLA (Hue, Saturation, Lightness, and Alpha which is typically used in CSS) values and return an array containing the 4 HSLA parameters of the hex color
|
static BBjVector |
getHSLAValuesFromHSBAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness,
BBjNumber p_alpha)
Method to get a vector of HSLA values from HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) discrete values
|
static BBjVector |
getHSLAValuesFromHSBAValues(BBjVector p_values!)
Method to get a vector of HSLA values from HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) values in a vector
|
static BBjVector |
getHSLAValuesFromJavaColor(Color p_color!)
Method to convert a Java Color to its corresponding HSLA (Hue, Saturation, Lightness, and Alpha which is typically used in CSS) values and return an array containing the 4 HSLA parameters of the Java Color
|
static BBjString |
getHSLStringFromBBjColor(BBjColor p_color!)
Method to format a BBjColor into an HSL string in the format
hsl(h, s%, l%) |
static BBjString |
getHSLStringFromHexString(BBjString p_colorHexString$)
Method to format a hex color string into an HSL string in the format
hsl(h, s%, l%) |
static BBjString |
getHSLStringFromHSBValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_brightness)
Method to format individual HSB values into an HSL string in the format
hsl(h, s%, l%) |
static BBjString |
getHSLStringFromHSBValues(BBjVector p_values!)
Method to format a BBjVector of individual HSB values into an HSL string in the format
hsl(h, s%, l%) |
static BBjString |
getHSLStringFromHSLValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness)
Method to format individual HSL values into an HSL string in the format
hsl(h, s%, l%) |
static BBjString |
getHSLStringFromHSLValues(BBjVector p_values!)
Method to format a BBjVector of individual HSL values into an HSL string in the format
hsl(h, s%, l%) |
static BBjString |
getHSLStringFromJavaColor(Color p_color!)
Method to format a Java Color into an HSL string in the format
hsl(h, s%, l%) |
static Color |
getJavaColorFromBBjColor(BBjColor p_color!)
Method to create a Java Color from a BBjColor
|
static Color |
getJavaColorFromHexString(BBjString p_colorHexString$)
Method to create a Java Color from a hex color string
|
static Color |
getJavaColorFromHSBAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_brightness,
BBjNumber p_alpha)
Method to create a Java Color from its corresponding HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) discrete values
|
static Color |
getJavaColorFromHSBAValues(BBjVector p_values!)
Method to create a Java Color from its corresponding HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) values in a BBjVector
|
static Color |
getJavaColorFromHSLAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness,
BBjNumber p_alpha)
Method to create a Java Color from its corresponding HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) discrete values
|
static Color |
getJavaColorFromHSLAValues(BBjVector p_values!)
Method to create a Java Color from its corresponding HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) values in a BBjVector
|
static BBjString |
getRGBAStringFromBBjColor(BBjColor p_color!)
Method to get an RGBA representation of a BBjColor
|
static BBjString |
getRGBAStringFromHexString(BBjString p_colorHexString$)
Method to get an RGBA representation of a hex color string
|
static BBjString |
getRGBAStringFromHSBAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_brightness,
BBjNumber p_alpha)
Method to get an RGBA representation from HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) discrete values
|
static BBjString |
getRGBAStringFromHSBAValues(BBjVector p_values!)
Method to get an RGBA representation from HSBA (Hue 0-360, Saturation 0-1, Brightness 0-1, Alpha 0-1) values in a vector
|
static BBjString |
getRGBAStringFromHSLAValues(BBjNumber p_hue,
BBjNumber p_saturation,
BBjNumber p_lightness,
BBjNumber p_alpha)
Method to get an RGBA representation from HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) discrete values
|
static BBjString |
getRGBAStringFromHSLAValues(BBjString p_colorHexString$)
Method to get an RGBA representation of a hex color string
|
static BBjString |
getRGBAStringFromHSLAValues(BBjVector p_values!)
Method to get an RGBA representation from HSLA (Hue 0-360, Saturation 0-1, Lightness 0-1, Alpha 0-1) values in a vector
|
static BBjString |
getRGBAStringFromJavaColor(Color p_color!)
Method to get an RGBA representation of a Java Color
|
static BBjString |
getRGBStringFromBBjColor(BBjColor p_color!)
Method to get an RGB representation of a BBjColor
|
static BBjString |
getRGBStringFromHexString(BBjString p_colorHexString$)
Method to get an RGB representation of a hex color string
|
static BBjString |
getRGBStringFromJavaColor(Color p_color!)
Method to get an RGB representation of a Java Color
|
public static BBjColor getBBjColorFromHexString(BBjString p_colorHexString$)
p_colorHexString$
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static Color getJavaColorFromHexString(BBjString p_colorHexString$)
p_colorHexString$
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjVector getHSLAValuesFromHexString(BBjString p_colorHexString$)
p_colorHexString$
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjVector getHSBAValuesFromHexString(BBjString p_colorHexString$)
p_colorHexString$
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static Color getJavaColorFromBBjColor(BBjColor p_color!)
public static BBjVector getHSLAValuesFromBBjColor(BBjColor p_color!)
p_color!
- A BBjColor that may have an alpha channelpublic static BBjVector getHSBAValuesFromBBjColor(BBjColor p_color!)
p_color!
- A BBjColor that may have an alpha channelpublic static BBjColor getBBjColorFromJavaColor(Color p_color!)
public static BBjVector getHSLAValuesFromJavaColor(Color p_color!)
p_color!
- A Java Colorpublic static BBjVector getHSBAValuesFromJavaColor(Color p_color!)
p_color!
- A Java Colorpublic static BBjColor getBBjColorFromHSLAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjColor getBBjColorFromHSLAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Lightness, and Alpha float values of the Colorpublic static BBjVector getHSBAValuesFromHSLAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjVector getHSBAValuesFromHSLAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Lightness, and Alpha float values of the Colorpublic static Color getJavaColorFromHSLAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Lightness, and Alpha float values of the Colorpublic static Color getJavaColorFromHSLAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjColor getBBjColorFromHSBAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_brightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjColor getBBjColorFromHSBAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Brightness, and Alpha float values of the Colorpublic static BBjVector getHSLAValuesFromHSBAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjVector getHSLAValuesFromHSBAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Brightness, and Alpha float values of the Colorpublic static Color getJavaColorFromHSBAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Brightness, and Alpha float values of the Colorpublic static Color getJavaColorFromHSBAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_brightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getHSLAStringFromHSLAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness, BBjNumber p_alpha)
hsla(h, s%, l%, a)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getHSLAStringFromHSLAValues(BBjVector p_values!)
hsla(h, s%, l%, a)
p_values!
- A BBjVector filled with the Hue, Saturation, Lightness, and Alpha float values of the Colorpublic static BBjString getHSLStringFromHSLValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness)
hsl(h, s%, l%)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagepublic static BBjString getHSLStringFromHSLValues(BBjVector p_values!)
hsl(h, s%, l%)
p_values!
- A BBjVector filled with the Hue, Saturation, and Lightness float values of the Colorpublic static BBjString getHSLAStringFromHSBAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_brightness, BBjNumber p_alpha)
hsla(h, s%, l%, a)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getHSLAStringFromHSBAValues(BBjVector p_values!)
hsla(h, s%, l%, a)
p_values!
- A BBjVector filled with the Hue, Saturation, Brightness, and Alpha float values of the Colorpublic static BBjString getHSLStringFromHSBValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_brightness)
hsl(h, s%, l%)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagepublic static BBjString getHSLStringFromHSBValues(BBjVector p_values!)
hsl(h, s%, l%)
p_values!
- A BBjVector filled with the Hue, Saturation, and Brightness float values of the Colorpublic static BBjString getHSLAStringFromBBjColor(BBjColor p_color!)
hsla(h, s%, l%, a)
p_color!
- A BBjColor that may have an alpha channelpublic static BBjString getHSLStringFromBBjColor(BBjColor p_color!)
hsl(h, s%, l%)
p_color!
- A BBjColor that may have an alpha channelpublic static BBjString getHSLAStringFromJavaColor(Color p_color!)
hsla(h, s%, l%, a)
p_color!
- A Java Color that may have an alpha channelpublic static BBjString getHSLStringFromJavaColor(Color p_color!)
hsl(h, s%, l%)
p_color!
- A Java Colorpublic static BBjString getHSLAStringFromHexString(BBjString p_colorHexString$)
hsla(h, s%, l%, a)
p_colorHexString$
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjString getHSLStringFromHexString(BBjString p_colorHexString$)
hsl(h, s%, l%)
p_colorHexString$
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjString getHSBAStringFromHSLAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness, BBjNumber p_alpha)
hsba(h, s%, b%, a)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getHSBAStringFromHSLAValues(BBjVector p_values!)
hsba(h, s%, b%, a)
p_values!
- A BBjVector filled with the Hue, Saturation, Lightness, and Alpha float values of the Colorpublic static BBjString getHSBStringFromHSLValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness)
hsb(h, s%, b%)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagepublic static BBjString getHSBStringFromHSLValues(BBjVector p_values!)
hsb(h, s%, b%)
p_values!
- A BBjVector filled with the Hue, Saturation, and Lightness float values of the Colorpublic static BBjString getHSBAStringFromHSBAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_brightness, BBjNumber p_alpha)
hsba(h, s%, b%, a)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getHSBAStringFromHSBAValues(BBjVector p_values!)
hsba(h, s%, b%, a)
p_values!
- A BBjVector filled with the Hue, Saturation, Brightness, and Alpha float values of the Colorpublic static BBjString getHSBStringFromHSBValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_brightness)
hsb(h, s%, b%)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagepublic static BBjString getHSBStringFromHSBValues(BBjVector p_values!)
hsb(h, s%, b%)
p_values!
- A BBjVector filled with the Hue, Saturation, and Brightness float values of the Colorpublic static BBjString getHSBAStringFromBBjColor(BBjColor p_color!)
hsba(h, s%, b%, a)
p_color!
- A BBjColor that may have an alpha channelpublic static BBjString getHSBStringFromBBjColor(BBjColor p_color!)
hsb(h, s%, b%)
p_color!
- A BBjColor that may have an alpha channelpublic static BBjString getHSBAStringFromJavaColor(Color p_color!)
hsba(h, s%, b%, a)
p_color!
- A Java Color that may have an alpha channelpublic static BBjString getHSBStringFromJavaColor(Color p_color!)
hsb(h, s%, b%)
p_color!
- A Java Colorpublic static BBjString getHSBAStringFromHexString(BBjString p_colorHexString$)
hsba(h, s%, b%, a)
p_colorHexString$
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjString getHSBStringFromHexString(BBjString p_colorHexString$)
hsb(h, s%, b%)
p_colorHexString$
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjString getHexStringFromJavaColor(Color p_color!)
p_color!
- A Java Colorpublic static BBjString getHexStringFromBBjColor(BBjColor p_color!)
p_color!
- A BBjColor that may have an alpha channelpublic static BBjString getHexStringFromFromHSLAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getHexStringFromFromHSLAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Lightness, and Alpha float values of the Colorpublic static BBjString getHexStringFromFromHSBAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_brightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getHexStringFromFromHSBAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Brightness, and Alpha float values of the Colorpublic static BBjString getRGBAStringFromJavaColor(Color p_color!)
p_color!
- A Java Colorpublic static BBjString getRGBAStringFromBBjColor(BBjColor p_color!)
p_color!
- A BBjColorpublic static BBjString getRGBStringFromJavaColor(Color p_color!)
p_color!
- A Java Colorpublic static BBjString getRGBStringFromBBjColor(BBjColor p_color!)
p_color!
- A BBjColorpublic static BBjString getRGBAStringFromHexString(BBjString p_colorHexString$)
p_color!
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjString getRGBStringFromHexString(BBjString p_colorHexString$)
p_color!
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjString getRGBAStringFromHSLAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_lightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_lightness
- The lightness component of the color, a floating point number from 0-1 indicating the lightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getRGBAStringFromHSLAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Lightness, and Alpha float values of the Colorpublic static BBjString getRGBAStringFromHSBAValues(BBjNumber p_hue, BBjNumber p_saturation, BBjNumber p_brightness, BBjNumber p_alpha)
p_hue
- The hue component of the color, a floating point number from 0-360 indicating the hue degreep_saturation
- The saturation component of the color, a floating point number from 0-1 indicating the saturation percentagep_brightness
- The brightness component of the color, a floating point number from 0-1 indicating the brightness percentagep_alpha
- The alpha component of the color, a floating point number from 0-1 indicating the alpha percentage where 0 = transparent and 1 = opaquepublic static BBjString getRGBAStringFromHSBAValues(BBjVector p_values!)
p_values!
- A BBjVector filled with the Hue, Saturation, Brightness, and Alpha float values of the Colorpublic static BBjString getRGBAStringFromHSLAValues(BBjString p_colorHexString$)
p_color!
- A hex color string. An example would be '#ff00cc' or '#f0c' or '#ff00ccbb' or '#f0cb' depending on whether the hex color has an alpha channel.public static BBjString getHexFromDecimal(BBjNumber p_decimalValue)
p_decimalValue
- A BBjNumberf0
' without the octothorpepublic static BBjNumber getDecimalFromHex(BBjString p_hexValue$)
p_hexValue$
- A BBjString filled with a two-digit hexadecimal number, like 'f0
'