pix 0.7: Reference Manual

::pix::colorTop, Main, Index

Formats Color
rgbae.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.
hexHtmle.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.
rgbe.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.
hexalphae.g : FF0000FF
Hexadecimal characters (uppercase or lowercase). Length of 8 characters (typical for an RGBA color)
hexe.g : FF0000
Hexadecimal characters (uppercase or lowercase). Length of 6 characters (typical for an RGB color)
rgbxe.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.
simple colore.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.
string colore.g : white
HTML color as a name.
hsve.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.
hsle.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.
tiny hexe.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
color1color or colorObj color
color2color or colorObj color
epsilondouble 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
colorcolor or colorObj color
amountdouble 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
colorcolor or colorObj color
amountdouble 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
color1color or colorObj color
color2color or colorObj color
Return value

A distance.

hexHTML [::pix::color]Top, Main, Index

Sets a new hex html color object.

hexHTML hex
Parameters
hexhex 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
colorcolor or colorObj color
amountdouble 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
color1color or colorObj color
color2color or colorObj color
lerpdouble 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
nameHTML 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
rinteger (0-255)
ginteger (0-255)
binteger (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
rinteger (0-255)
ginteger (0-255)
binteger (0-255)
adouble (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
colorcolor or colorObj color
amountdouble value (0-1)
Return value

A new type color object.