Gets the alpha color part of an alpha hex color. For example, from
'#abcdef55' return '55'. The result is guaranteed to be two characters long.
|
code » | |||||
Gets the hex color part of an alpha hex color. For example, from '#abcdef55'
return '#abcdef'.
|
code » | |||||
Converts an 8-hex representation of a color to RGBA.
|
code » | |||||
Converts a hex representation of a color to RGBA.
|
code » | |||||
Converts a color from HSLA to hex representation.
|
code » | |||||
Converts a color from HSLA to an RGBA style string.
|
code » | |||||
Converts a color from HSLA to hex representation.
|
code » | |||||
Converts a color from HSLA color space to RGBA color space.
|
code » | |||||
Converts a color from HSLA to an RGBA style string.
Arguments:
Returns: string
An 'rgba(r,g,b,a)' string ready for use in a CSS rule.
styles.
|
code » | |||||
Converts from an HSVA array to a hex string
|
code » | |||||
Converts from h,s,v,a values to a hex string
|
code » | |||||
Checks if a string is a normalized alpha hex color.
We expect strings of the format #RRGGBBAA (ex: #1b3d5f5b)
using only lowercase letters.
|
code » | |||||
Checks if a string is a valid alpha hex color. We expect strings of the
format #RRGGBBAA (ex: #1b3d5f5b) or #RGBA (ex: #3CAF == #33CCAAFF).
|
code » | |||||
Checks if a string is a valid hsla color. We expect strings of the format
'hsla(h, s, l, a)', where s in an int in [0, 360], s and l are percentages
between 0 and 100 such as '50%' or '70%', and a is a float in [0, 1].
|
code » | |||||
Checks if a string is a valid rgba color. We expect strings of the format
'(r, g, b, a)', or 'rgba(r, g, b, a)', where r, g, b are ints in [0, 255]
and a is a float in [0, 1].
|
code » | |||||
Normalize a hex representation of an alpha color.
|
code » | |||||
![]()
Parses an alpha color out of a string.
Arguments:
Returns: {hex: string, type: string
} 'hex' is a string containing
a hex representation of the color, and 'type' is a string
containing the type of color format passed in ('hex', 'rgb', 'named').
|
code » | |||||
Converts a color from RGBA to hex representation.
|
code » | |||||
Converts a color from RGBA color space to HSLA color space.
|
code » | |||||
Converts a color from RGBA to an RGBA style string.
|
code » | |||||
Takes an array of [r, g, b, a] and converts it into a string appropriate for
CSS styles. The alpha channel value is rounded to 3 decimal places to make
sure the produced string is not too long.
|
code » | |||||
Converts a color from RGBA to hex representation.
|
code » | |||||
Converts a color from RGBA color space to HSLA color space.
Modified from
http://en.wikipedia.org/wiki/HLS_color_space .
|
code » | |||||
Converts a color from RGBA to an RGBA style string.
|
code » |