::pix::colorTop, Main, Index
- The following color formats can be used:
| Formats | Color |
|---|---|
| e.g : rgba(x,x,x,x) This format takes four arguments, for the red, green, blue, and alpha components of the color. The arguments are all integers numbers between 0 and 255. | |
| e.g : #F8D1DD This format takes a single argument, which is a string in the format of a hex code. The hex code should be 7 characters long (including the # symbol), and each character (except #) should be a valid hex digit. | |
| e.g : rgb(x,x,x) This format takes three arguments, for the red, green, and blue components of the color. The arguments are all integers numbers between 0 and 255. | |
| e.g : FF0000FF Hexadecimal characters (uppercase or lowercase). Length of 8 characters (typical for an RGBA color) | |
| e.g : FF0000 Hexadecimal characters (uppercase or lowercase). Length of 6 characters (typical for an RGB color) | |
| e.g : rgbx(x,x,x,x) This format takes four arguments, for the red, green, blue, and alpha components of the color. The arguments are all integers numbers between 0 and 255. | |
| e.g : {0.0 0.0 0.0 0.0} or {0.0 0.0 0.0} This format takes a list of three or four floating point numbers between 0.0 and 1.0. The numbers are the red, green, blue, and optionally alpha components of the color. | |
| e.g : white HTML color as a name. | |
| e.g : hsv(h,s,v) This format takes three arguments, for the hue, saturation, and value components of the color. The arguments are all floating point. hue 0 to 360, saturation 0 to 100, and value 0 to 100. | |
| e.g : hsl(h,s,l) This format takes three arguments, for the hue, saturation, and lightness components of the color. The arguments are all floating point. hue 0 to 360, saturation 0 to 100, and lightness 0 to 100. | |
| e.g : #FF6 This format is a shorthand hexadecimal notation with 4 characters (including the # symbol), where each hex digit is doubled (e.g., #RGB becomes #RRGGBB). |
CommandsTop, Main, Index
almostEqual [::pix::color]Top, Main, Index
Almost equal colors.
almostEqual color1 color2 ?epsilon?
Parameters
color1 | color or colorObj color |
color2 | color or colorObj color |
epsilon | double value Optional, default 0.01. |
Return value
True if colors are close.
darken [::pix::color]Top, Main, Index
Darkens the color by amount 0-1.
darken color amount
Parameters
color | color or colorObj color |
amount | double value (0-1) |
Return value
A new type color object.
desaturate [::pix::color]Top, Main, Index
Desaturate (makes grayer) the color by amount 0-1.
desaturate color amount
Parameters
color | color or colorObj color |
amount | double value (0-1) |
Return value
A new type color object.
distance [::pix::color]Top, Main, Index
A distance function based on CIEDE2000 color difference formula.
distance color1 color2
Parameters
color1 | color or colorObj color |
color2 | color or colorObj color |
Return value
A distance.
hexHTML [::pix::color]Top, Main, Index
Sets a new hex html color object.
hexHTML hex
Parameters
hex | hex string |
Return value
A new type color object.
lighten [::pix::color]Top, Main, Index
Lightens the color by amount 0-1.
lighten color amount
Parameters
color | color or colorObj color |
amount | double value (0-1) |
Return value
A new type color object.
mix [::pix::color]Top, Main, Index
Mixes two colours using simple averaging or simple lerp if the “lerp” argument is specified.
mix color1 color2 ?lerp?
Parameters
color1 | color or colorObj color |
color2 | color or colorObj color |
lerp | double value Optional, default "". |
Return value
A new type color object.
name [::pix::color]Top, Main, Index
Sets a new name color object.
name name
Parameters
name | HTML name |
Return value
A new type color object.
rgb [::pix::color]Top, Main, Index
Sets a new rgb color object.
rgb r g b
Parameters
r | integer (0-255) |
g | integer (0-255) |
b | integer (0-255) |
Return value
A new type color object.
rgba [::pix::color]Top, Main, Index
Sets a new rgba color object.
rgba r g b a
Parameters
r | integer (0-255) |
g | integer (0-255) |
b | integer (0-255) |
a | double (0-1) |
Return value
A new type color object.
saturate [::pix::color]Top, Main, Index
Saturates (makes brighter) the color by amount 0-1.
saturate color amount
Parameters
color | color or colorObj color |
amount | double value (0-1) |
Return value
A new type color object.