The [colorRef] command.
Introduction
The colorRef command lets you create and manipulate colors in
Alpha.
Synopsis
The formal syntax of the [colorRef] command is:
colorRef subcommand ?options? |
The possible subcommands are described below. Depending on the subcommand,
various options can be additionally specified.
The [components] subcommand
This subcommand lets you get the components of a color. The syntax is:
colorRef components ?-space (RGB|CYMK|HSB|GRAY)? ?-alpha (0|1)? token
The token argument designates the color whose components
you want to retrieve.
The -space option has the same meaning as with the [colorRef
create] command. The default value is RGB. You do not need necessarily to
specify the same color space as when the color was created: this command
can be used to convert a color from a color space to the other.
The -alpha option specifies whether the opacity (alpha
component) should be included. By default, this option is set to 0.
The [create] subcommand
This subcommand creates a new color. It has the following syntax:
colorRef create ?-space (RGB|CYMK|HSB|GRAY)? components...
The command returns a token used in the other
subcommands to uniquely identify the color.
The -space option lets you specify the color space in which
the color components are defined. The possible values are :
- RGB for the Red/Green/Blue color space
- CYMK for the Cyan/Yellow/Magenta/Black color space
- HSB for the Hue/Saturation/Brightness color space
- GRAY for the levels of gray color space
The default color space is RGB.
The components argument represents the coordinates of the
color in the colorspace.
The last component is optional and corresponds to the opacity (aka
the alpha channel). If it is not specified, the opacity is set by default
to 1.0 (which means the image is totally opaque).
The values of the components are real numbers between 0.0 and 1.0.
Values below 0.0 are interpreted as 0.0, and values above 1.0 are
interpreted as 1.0.
The number of expected components depends on the color space which
is used and on the opacity. In the case of the RGB and HSB color spaces,
there should be 3 or 4 components. In the case of the CYMK color space,
there should be 4 or 5 components. In the case of the GRAY color space,
there should be 1 or 2 components: the first one is the level of gray and
the second one is an optional value for the opacity.
The [delete] subcommand
This subcommand lets you delete a color. The syntax is:
colorRef delete token
After deletion, the token associated with this color is not valid anymore.
The [list] subcommand
This subcommand returns a list of the existing color tokens. The syntax is:
colorRef list
The [named] subcommand
This subcommand is used to find named colors. The syntax is:
colorRef named name
It returns a token for the color designated by the name argument
if this name exists in the catalog or otherwise raises an error.
See the table in the Color Names section for a list
of possible values.
The [names] subcommand
This subcommand returns a list of color names. The syntax is:
colorRef names
Alpha is built with a colors catalog containing predefined colors
designated by a name. This command returns the list of all the names
available in the catalog.
See the table in the Color Names section for
the exact specification of all the named colors.
The [panel] subcommand
This subcommand displays the color panel.
The syntax is:
colorRef panel ?-space (RGB|CYMK|HSB|GRAY)? ?-alpha (0|1)? \
?-default {r g b ?a?}?
The options have the following signification:
- -alpha
- this option specifies whether the color picker should allow selecting the
opacity of the color. By default, this option is set to 0.
- -default
- this option specifies an initial set of values for the color picker. Its
value is a list of three or four floating numbers between 0 and 1
representing the RGB components and an optional alpha component (equal to 1
by default).
- -space
- this option has the same meaning as with the [colorRef create] command. The default value is RGB.
- -title
- this option specifies a title for the color picker window.
The command does not return anything. The color panel acts on the current
document window: the color chosen in the panel applies to the current
selection.
If you need to ask the user to select a color, use the [colorRef pick] command instead.
The [pick] subcommand
This subcommand lets you get the components of a color using a color picker.
The syntax is:
colorRef pick ?-space (RGB|CYMK|HSB|GRAY)? ?-alpha (0|1)? \
?-default {r g b ?a?}? ?-title str?
The options
-alpha,
-default,
-space
have the same meaning as with the [colorRef panel] command.
The -title
option specifies a title for the color picker window.
The difference between the [colorRef panel] and
the [colorRef pick] commands is that the former
displays the panel and returns immediately whereas the latter is run
modally and presents Cancel and OK buttons to exit the
dialog.
The command returns a list of floating values (between 0 and 1)
corresponding to the components of the chosen color. The number of
components depends on the color space: in the case of the default RGB space, the
command returns a three-element list with the red, green and blue
components.
The [space] subcommand
This subcommand returns the name of the color space in which a color is
defined. The syntax is:
colorRef space token
The color is designated by its token. Note that colors created in the HSB
colorspace are silently converted by Cocoa into the RGB colorspace: the
returned info is the RGB colorspace.
Color names
Here is the complete list of the 657 colors defined in the Alpha colors
catalog with their specification in the RGB color space.
Name | R | G | B |
aliceblue | 0.94 | 0.97 | 1 |
antiquewhite1 | 1 | 0.94 | 0.86 |
antiquewhite2 | 0.93 | 0.87 | 0.8 |
antiquewhite3 | 0.8 | 0.75 | 0.69 |
antiquewhite4 | 0.55 | 0.51 | 0.47 |
antiquewhite | 0.98 | 0.92 | 0.84 |
aquamarine1 | 0.5 | 1 | 0.83 |
aquamarine2 | 0.46 | 0.93 | 0.78 |
aquamarine3 | 0.4 | 0.8 | 0.67 |
aquamarine4 | 0.27 | 0.55 | 0.45 |
aquamarine | 0.5 | 1 | 0.83 |
azure1 | 0.94 | 1 | 1 |
azure2 | 0.88 | 0.93 | 0.93 |
azure3 | 0.76 | 0.8 | 0.8 |
azure4 | 0.51 | 0.55 | 0.55 |
azure | 0.94 | 1 | 1 |
beige | 0.96 | 0.96 | 0.86 |
bisque1 | 1 | 0.89 | 0.77 |
bisque2 | 0.93 | 0.84 | 0.72 |
bisque3 | 0.8 | 0.72 | 0.62 |
bisque4 | 0.55 | 0.49 | 0.42 |
bisque | 1 | 0.89 | 0.77 |
black | 0 | 0 | 0 |
blanchedalmond | 1 | 0.92 | 0.8 |
blue1 | 0 | 0 | 1 |
blue2 | 0 | 0 | 0.93 |
blue3 | 0 | 0 | 0.8 |
blue4 | 0 | 0 | 0.55 |
blue | 0 | 0 | 1 |
blueviolet | 0.54 | 0.17 | 0.89 |
brown1 | 1 | 0.25 | 0.25 |
brown2 | 0.93 | 0.23 | 0.23 |
brown3 | 0.8 | 0.2 | 0.2 |
brown4 | 0.55 | 0.14 | 0.14 |
brown | 0.65 | 0.16 | 0.16 |
burlywood1 | 1 | 0.83 | 0.61 |
burlywood2 | 0.93 | 0.77 | 0.57 |
burlywood3 | 0.8 | 0.67 | 0.49 |
burlywood4 | 0.55 | 0.45 | 0.33 |
burlywood | 0.87 | 0.72 | 0.53 |
cadetblue1 | 0.6 | 0.96 | 1 |
cadetblue2 | 0.56 | 0.9 | 0.93 |
cadetblue3 | 0.48 | 0.77 | 0.8 |
cadetblue4 | 0.33 | 0.53 | 0.55 |
cadetblue | 0.37 | 0.62 | 0.63 |
chartreuse1 | 0.5 | 1 | 0 |
chartreuse2 | 0.46 | 0.93 | 0 |
chartreuse3 | 0.4 | 0.8 | 0 |
chartreuse4 | 0.27 | 0.55 | 0 |
chartreuse | 0.5 | 1 | 0 |
chocolate1 | 1 | 0.5 | 0.14 |
chocolate2 | 0.93 | 0.46 | 0.13 |
chocolate3 | 0.8 | 0.4 | 0.11 |
chocolate4 | 0.55 | 0.27 | 0.07 |
chocolate | 0.82 | 0.41 | 0.12 |
coral1 | 1 | 0.45 | 0.34 |
coral2 | 0.93 | 0.42 | 0.31 |
coral3 | 0.8 | 0.36 | 0.27 |
coral4 | 0.55 | 0.24 | 0.18 |
coral | 1 | 0.5 | 0.31 |
cornflowerblue | 0.39 | 0.58 | 0.93 |
cornsilk1 | 1 | 0.97 | 0.86 |
cornsilk2 | 0.93 | 0.91 | 0.8 |
cornsilk3 | 0.8 | 0.78 | 0.69 |
cornsilk4 | 0.55 | 0.53 | 0.47 |
cornsilk | 1 | 0.97 | 0.86 |
cyan1 | 0 | 1 | 1 |
cyan2 | 0 | 0.93 | 0.93 |
cyan3 | 0 | 0.8 | 0.8 |
cyan4 | 0 | 0.55 | 0.55 |
cyan | 0 | 1 | 1 |
darkblue | 0 | 0 | 0.55 |
darkcyan | 0 | 0.55 | 0.55 |
darkgoldenrod1 | 1 | 0.73 | 0.06 |
darkgoldenrod2 | 0.93 | 0.68 | 0.05 |
darkgoldenrod3 | 0.8 | 0.58 | 0.05 |
darkgoldenrod4 | 0.55 | 0.4 | 0.03 |
darkgoldenrod | 0.72 | 0.53 | 0.04 |
darkgray | 0.66 | 0.66 | 0.66 |
darkgreen | 0 | 0.39 | 0 |
darkgrey | 0.66 | 0.66 | 0.66 |
darkkhaki | 0.74 | 0.72 | 0.42 |
darkmagenta | 0.55 | 0 | 0.55 |
darkolivegreen1 | 0.79 | 1 | 0.44 |
darkolivegreen2 | 0.74 | 0.93 | 0.41 |
darkolivegreen3 | 0.64 | 0.8 | 0.35 |
darkolivegreen4 | 0.43 | 0.55 | 0.24 |
darkolivegreen | 0.33 | 0.42 | 0.18 |
darkorange1 | 1 | 0.5 | 0 |
darkorange2 | 0.93 | 0.46 | 0 |
darkorange3 | 0.8 | 0.4 | 0 |
darkorange4 | 0.55 | 0.27 | 0 |
darkorange | 1 | 0.55 | 0 |
darkorchid1 | 0.75 | 0.24 | 1 |
darkorchid2 | 0.7 | 0.23 | 0.93 |
darkorchid3 | 0.6 | 0.2 | 0.8 |
darkorchid4 | 0.41 | 0.13 | 0.55 |
darkorchid | 0.6 | 0.2 | 0.8 |
darkred | 0.55 | 0 | 0 |
darksalmon | 0.91 | 0.59 | 0.48 |
darkseagreen1 | 0.76 | 1 | 0.76 |
darkseagreen2 | 0.71 | 0.93 | 0.71 |
darkseagreen3 | 0.61 | 0.8 | 0.61 |
darkseagreen4 | 0.41 | 0.55 | 0.41 |
darkseagreen | 0.56 | 0.74 | 0.56 |
darkslateblue | 0.28 | 0.24 | 0.55 |
darkslategray1 | 0.59 | 1 | 1 |
darkslategray2 | 0.55 | 0.93 | 0.93 |
darkslategray3 | 0.47 | 0.8 | 0.8 |
darkslategray4 | 0.32 | 0.55 | 0.55 |
darkslategray | 0.18 | 0.31 | 0.31 |
darkslategrey | 0.18 | 0.31 | 0.31 |
darkturquoise | 0 | 0.81 | 0.82 |
darkviolet | 0.58 | 0 | 0.83 |
deeppink1 | 1 | 0.08 | 0.58 |
deeppink2 | 0.93 | 0.07 | 0.54 |
deeppink3 | 0.8 | 0.06 | 0.46 |
deeppink4 | 0.55 | 0.04 | 0.31 |
deeppink | 1 | 0.08 | 0.58 |
deepskyblue1 | 0 | 0.75 | 1 |
deepskyblue2 | 0 | 0.7 | 0.93 |
deepskyblue3 | 0 | 0.6 | 0.8 |
deepskyblue4 | 0 | 0.41 | 0.55 |
deepskyblue | 0 | 0.75 | 1 |
dimgray | 0.41 | 0.41 | 0.41 |
dimgrey | 0.41 | 0.41 | 0.41 |
dodgerblue1 | 0.12 | 0.56 | 1 |
dodgerblue2 | 0.11 | 0.53 | 0.93 |
dodgerblue3 | 0.09 | 0.45 | 0.8 |
dodgerblue4 | 0.06 | 0.31 | 0.55 |
dodgerblue | 0.12 | 0.56 | 1 |
firebrick1 | 1 | 0.19 | 0.19 |
firebrick2 | 0.93 | 0.17 | 0.17 |
firebrick3 | 0.8 | 0.15 | 0.15 |
firebrick4 | 0.55 | 0.1 | 0.1 |
firebrick | 0.7 | 0.13 | 0.13 |
floralwhite | 1 | 0.98 | 0.94 |
forestgreen | 0.13 | 0.55 | 0.13 |
gainsboro | 0.86 | 0.86 | 0.86 |
ghostwhite | 0.97 | 0.97 | 1 |
gold1 | 1 | 0.84 | 0 |
gold2 | 0.93 | 0.79 | 0 |
gold3 | 0.8 | 0.68 | 0 |
gold4 | 0.55 | 0.46 | 0 |
gold | 1 | 0.84 | 0 |
goldenrod1 | 1 | 0.76 | 0.15 |
goldenrod2 | 0.93 | 0.71 | 0.13 |
goldenrod3 | 0.8 | 0.61 | 0.11 |
goldenrod4 | 0.55 | 0.41 | 0.08 |
goldenrod | 0.85 | 0.65 | 0.13 |
gray0 | 0 | 0 | 0 |
gray1 | 0.01 | 0.01 | 0.01 |
gray2 | 0.02 | 0.02 | 0.02 |
gray3 | 0.03 | 0.03 | 0.03 |
gray4 | 0.04 | 0.04 | 0.04 |
gray5 | 0.05 | 0.05 | 0.05 |
gray6 | 0.06 | 0.06 | 0.06 |
gray7 | 0.07 | 0.07 | 0.07 |
gray8 | 0.08 | 0.08 | 0.08 |
gray9 | 0.09 | 0.09 | 0.09 |
gray10 | 0.1 | 0.1 | 0.1 |
gray11 | 0.11 | 0.11 | 0.11 |
gray12 | 0.12 | 0.12 | 0.12 |
gray13 | 0.13 | 0.13 | 0.13 |
gray14 | 0.14 | 0.14 | 0.14 |
gray15 | 0.15 | 0.15 | 0.15 |
gray16 | 0.16 | 0.16 | 0.16 |
gray17 | 0.17 | 0.17 | 0.17 |
gray18 | 0.18 | 0.18 | 0.18 |
gray19 | 0.19 | 0.19 | 0.19 |
gray20 | 0.2 | 0.2 | 0.2 |
gray21 | 0.21 | 0.21 | 0.21 |
gray22 | 0.22 | 0.22 | 0.22 |
gray23 | 0.23 | 0.23 | 0.23 |
gray24 | 0.24 | 0.24 | 0.24 |
gray25 | 0.25 | 0.25 | 0.25 |
gray26 | 0.26 | 0.26 | 0.26 |
gray27 | 0.27 | 0.27 | 0.27 |
gray28 | 0.28 | 0.28 | 0.28 |
gray29 | 0.29 | 0.29 | 0.29 |
gray30 | 0.3 | 0.3 | 0.3 |
gray31 | 0.31 | 0.31 | 0.31 |
gray32 | 0.32 | 0.32 | 0.32 |
gray33 | 0.33 | 0.33 | 0.33 |
gray34 | 0.34 | 0.34 | 0.34 |
gray35 | 0.35 | 0.35 | 0.35 |
gray36 | 0.36 | 0.36 | 0.36 |
gray37 | 0.37 | 0.37 | 0.37 |
gray38 | 0.38 | 0.38 | 0.38 |
gray39 | 0.39 | 0.39 | 0.39 |
gray40 | 0.4 | 0.4 | 0.4 |
gray41 | 0.41 | 0.41 | 0.41 |
gray42 | 0.42 | 0.42 | 0.42 |
gray43 | 0.43 | 0.43 | 0.43 |
gray44 | 0.44 | 0.44 | 0.44 |
gray45 | 0.45 | 0.45 | 0.45 |
gray46 | 0.46 | 0.46 | 0.46 |
gray47 | 0.47 | 0.47 | 0.47 |
gray48 | 0.48 | 0.48 | 0.48 |
gray49 | 0.49 | 0.49 | 0.49 |
gray50 | 0.5 | 0.5 | 0.5 |
gray51 | 0.51 | 0.51 | 0.51 |
gray52 | 0.52 | 0.52 | 0.52 |
gray53 | 0.53 | 0.53 | 0.53 |
gray54 | 0.54 | 0.54 | 0.54 |
gray55 | 0.55 | 0.55 | 0.55 |
gray56 | 0.56 | 0.56 | 0.56 |
gray57 | 0.57 | 0.57 | 0.57 |
gray58 | 0.58 | 0.58 | 0.58 |
gray59 | 0.59 | 0.59 | 0.59 |
gray60 | 0.6 | 0.6 | 0.6 |
gray61 | 0.61 | 0.61 | 0.61 |
gray62 | 0.62 | 0.62 | 0.62 |
gray63 | 0.63 | 0.63 | 0.63 |
gray64 | 0.64 | 0.64 | 0.64 |
gray65 | 0.65 | 0.65 | 0.65 |
gray66 | 0.66 | 0.66 | 0.66 |
gray67 | 0.67 | 0.67 | 0.67 |
gray68 | 0.68 | 0.68 | 0.68 |
gray69 | 0.69 | 0.69 | 0.69 |
gray70 | 0.7 | 0.7 | 0.7 |
gray71 | 0.71 | 0.71 | 0.71 |
gray72 | 0.72 | 0.72 | 0.72 |
gray73 | 0.73 | 0.73 | 0.73 |
gray74 | 0.74 | 0.74 | 0.74 |
gray75 | 0.75 | 0.75 | 0.75 |
gray76 | 0.76 | 0.76 | 0.76 |
gray77 | 0.77 | 0.77 | 0.77 |
gray78 | 0.78 | 0.78 | 0.78 |
gray79 | 0.79 | 0.79 | 0.79 |
gray80 | 0.8 | 0.8 | 0.8 |
gray81 | 0.81 | 0.81 | 0.81 |
gray82 | 0.82 | 0.82 | 0.82 |
gray83 | 0.83 | 0.83 | 0.83 |
gray84 | 0.84 | 0.84 | 0.84 |
gray85 | 0.85 | 0.85 | 0.85 |
gray86 | 0.86 | 0.86 | 0.86 |
gray87 | 0.87 | 0.87 | 0.87 |
gray88 | 0.88 | 0.88 | 0.88 |
gray89 | 0.89 | 0.89 | 0.89 |
gray90 | 0.9 | 0.9 | 0.9 |
gray91 | 0.91 | 0.91 | 0.91 |
gray92 | 0.92 | 0.92 | 0.92 |
gray93 | 0.93 | 0.93 | 0.93 |
gray94 | 0.94 | 0.94 | 0.94 |
gray95 | 0.95 | 0.95 | 0.95 |
gray96 | 0.96 | 0.96 | 0.96 |
gray97 | 0.97 | 0.97 | 0.97 |
gray98 | 0.98 | 0.98 | 0.98 |
gray99 | 0.99 | 0.99 | 0.99 |
gray100 | 1 | 1 | 1 |
gray | 0.75 | 0.75 | 0.75 |
green1 | 0 | 1 | 0 |
green2 | 0 | 0.93 | 0 |
green3 | 0 | 0.8 | 0 |
green4 | 0 | 0.55 | 0 |
green | 0.01 | 0.51 | 0.05 |
greenyellow | 0.68 | 1 | 0.18 |
grey0 | 0 | 0 | 0 |
grey1 | 0.01 | 0.01 | 0.01 |
grey2 | 0.02 | 0.02 | 0.02 |
grey3 | 0.03 | 0.03 | 0.03 |
grey4 | 0.04 | 0.04 | 0.04 |
grey5 | 0.05 | 0.05 | 0.05 |
grey6 | 0.06 | 0.06 | 0.06 |
grey7 | 0.07 | 0.07 | 0.07 |
grey8 | 0.08 | 0.08 | 0.08 |
grey9 | 0.09 | 0.09 | 0.09 |
grey10 | 0.1 | 0.1 | 0.1 |
grey11 | 0.11 | 0.11 | 0.11 |
grey12 | 0.12 | 0.12 | 0.12 |
grey13 | 0.13 | 0.13 | 0.13 |
grey14 | 0.14 | 0.14 | 0.14 |
grey15 | 0.15 | 0.15 | 0.15 |
grey16 | 0.16 | 0.16 | 0.16 |
grey17 | 0.17 | 0.17 | 0.17 |
grey18 | 0.18 | 0.18 | 0.18 |
grey19 | 0.19 | 0.19 | 0.19 |
grey20 | 0.2 | 0.2 | 0.2 |
grey21 | 0.21 | 0.21 | 0.21 |
grey22 | 0.22 | 0.22 | 0.22 |
grey23 | 0.23 | 0.23 | 0.23 |
grey24 | 0.24 | 0.24 | 0.24 |
grey25 | 0.25 | 0.25 | 0.25 |
grey26 | 0.26 | 0.26 | 0.26 |
grey27 | 0.27 | 0.27 | 0.27 |
grey28 | 0.28 | 0.28 | 0.28 |
grey29 | 0.29 | 0.29 | 0.29 |
grey30 | 0.3 | 0.3 | 0.3 |
grey31 | 0.31 | 0.31 | 0.31 |
grey32 | 0.32 | 0.32 | 0.32 |
grey33 | 0.33 | 0.33 | 0.33 |
grey34 | 0.34 | 0.34 | 0.34 |
grey35 | 0.35 | 0.35 | 0.35 |
grey36 | 0.36 | 0.36 | 0.36 |
grey37 | 0.37 | 0.37 | 0.37 |
grey38 | 0.38 | 0.38 | 0.38 |
grey39 | 0.39 | 0.39 | 0.39 |
grey40 | 0.4 | 0.4 | 0.4 |
grey41 | 0.41 | 0.41 | 0.41 |
grey42 | 0.42 | 0.42 | 0.42 |
grey43 | 0.43 | 0.43 | 0.43 |
grey44 | 0.44 | 0.44 | 0.44 |
grey45 | 0.45 | 0.45 | 0.45 |
grey46 | 0.46 | 0.46 | 0.46 |
grey47 | 0.47 | 0.47 | 0.47 |
grey48 | 0.48 | 0.48 | 0.48 |
grey49 | 0.49 | 0.49 | 0.49 |
grey50 | 0.5 | 0.5 | 0.5 |
grey51 | 0.51 | 0.51 | 0.51 |
grey52 | 0.52 | 0.52 | 0.52 |
grey53 | 0.53 | 0.53 | 0.53 |
grey54 | 0.54 | 0.54 | 0.54 |
grey55 | 0.55 | 0.55 | 0.55 |
grey56 | 0.56 | 0.56 | 0.56 |
grey57 | 0.57 | 0.57 | 0.57 |
grey58 | 0.58 | 0.58 | 0.58 |
grey59 | 0.59 | 0.59 | 0.59 |
grey60 | 0.6 | 0.6 | 0.6 |
grey61 | 0.61 | 0.61 | 0.61 |
grey62 | 0.62 | 0.62 | 0.62 |
grey63 | 0.63 | 0.63 | 0.63 |
grey64 | 0.64 | 0.64 | 0.64 |
grey65 | 0.65 | 0.65 | 0.65 |
grey66 | 0.66 | 0.66 | 0.66 |
grey67 | 0.67 | 0.67 | 0.67 |
grey68 | 0.68 | 0.68 | 0.68 |
grey69 | 0.69 | 0.69 | 0.69 |
grey70 | 0.7 | 0.7 | 0.7 |
grey71 | 0.71 | 0.71 | 0.71 |
grey72 | 0.72 | 0.72 | 0.72 |
grey73 | 0.73 | 0.73 | 0.73 |
grey74 | 0.74 | 0.74 | 0.74 |
grey75 | 0.75 | 0.75 | 0.75 |
grey76 | 0.76 | 0.76 | 0.76 |
grey77 | 0.77 | 0.77 | 0.77 |
grey78 | 0.78 | 0.78 | 0.78 |
grey79 | 0.79 | 0.79 | 0.79 |
grey80 | 0.8 | 0.8 | 0.8 |
grey81 | 0.81 | 0.81 | 0.81 |
grey82 | 0.82 | 0.82 | 0.82 |
grey83 | 0.83 | 0.83 | 0.83 |
grey84 | 0.84 | 0.84 | 0.84 |
grey85 | 0.85 | 0.85 | 0.85 |
grey86 | 0.86 | 0.86 | 0.86 |
grey87 | 0.87 | 0.87 | 0.87 |
grey88 | 0.88 | 0.88 | 0.88 |
grey89 | 0.89 | 0.89 | 0.89 |
grey90 | 0.9 | 0.9 | 0.9 |
grey91 | 0.91 | 0.91 | 0.91 |
grey92 | 0.92 | 0.92 | 0.92 |
grey93 | 0.93 | 0.93 | 0.93 |
grey94 | 0.94 | 0.94 | 0.94 |
grey95 | 0.95 | 0.95 | 0.95 |
grey96 | 0.96 | 0.96 | 0.96 |
grey97 | 0.97 | 0.97 | 0.97 |
grey98 | 0.98 | 0.98 | 0.98 |
grey99 | 0.99 | 0.99 | 0.99 |
grey100 | 1 | 1 | 1 |
grey | 0.75 | 0.75 | 0.75 |
honeydew1 | 0.94 | 1 | 0.94 |
honeydew2 | 0.88 | 0.93 | 0.88 |
honeydew3 | 0.76 | 0.8 | 0.76 |
honeydew4 | 0.51 | 0.55 | 0.51 |
honeydew | 0.94 | 1 | 0.94 |
hotpink1 | 1 | 0.43 | 0.71 |
hotpink2 | 0.93 | 0.42 | 0.65 |
hotpink3 | 0.8 | 0.38 | 0.56 |
hotpink4 | 0.55 | 0.23 | 0.38 |
hotpink | 1 | 0.41 | 0.71 |
indianred1 | 1 | 0.42 | 0.42 |
indianred2 | 0.93 | 0.39 | 0.39 |
indianred3 | 0.8 | 0.33 | 0.33 |
indianred4 | 0.55 | 0.23 | 0.23 |
indianred | 0.8 | 0.36 | 0.36 |
ivory1 | 1 | 1 | 0.94 |
ivory2 | 0.93 | 0.93 | 0.88 |
ivory3 | 0.8 | 0.8 | 0.76 |
ivory4 | 0.55 | 0.55 | 0.51 |
ivory | 1 | 1 | 0.94 |
khaki1 | 1 | 0.96 | 0.56 |
khaki2 | 0.93 | 0.9 | 0.52 |
khaki3 | 0.8 | 0.78 | 0.45 |
khaki4 | 0.55 | 0.53 | 0.31 |
khaki | 0.94 | 0.9 | 0.55 |
lavender | 0.9 | 0.9 | 0.98 |
lavenderblush1 | 1 | 0.94 | 0.96 |
lavenderblush2 | 0.93 | 0.88 | 0.9 |
lavenderblush3 | 0.8 | 0.76 | 0.77 |
lavenderblush4 | 0.55 | 0.51 | 0.53 |
lavenderblush | 1 | 0.94 | 0.96 |
lawngreen | 0.49 | 0.99 | 0 |
lemonchiffon1 | 1 | 0.98 | 0.8 |
lemonchiffon2 | 0.93 | 0.91 | 0.75 |
lemonchiffon3 | 0.8 | 0.79 | 0.65 |
lemonchiffon4 | 0.55 | 0.54 | 0.44 |
lemonchiffon | 1 | 0.98 | 0.8 |
lightblue1 | 0.75 | 0.94 | 1 |
lightblue2 | 0.7 | 0.87 | 0.93 |
lightblue3 | 0.6 | 0.75 | 0.8 |
lightblue4 | 0.41 | 0.51 | 0.55 |
lightblue | 0.68 | 0.85 | 0.9 |
lightcoral | 0.94 | 0.5 | 0.5 |
lightcyan1 | 0.88 | 1 | 1 |
lightcyan2 | 0.82 | 0.93 | 0.93 |
lightcyan3 | 0.71 | 0.8 | 0.8 |
lightcyan4 | 0.48 | 0.55 | 0.55 |
lightcyan | 0.88 | 1 | 1 |
lightgoldenrod1 | 1 | 0.93 | 0.55 |
lightgoldenrod2 | 0.93 | 0.86 | 0.51 |
lightgoldenrod3 | 0.8 | 0.75 | 0.44 |
lightgoldenrod4 | 0.55 | 0.51 | 0.3 |
lightgoldenrod | 0.93 | 0.87 | 0.51 |
lightgoldenrodyellow | 0.98 | 0.98 | 0.82 |
lightgray | 0.83 | 0.83 | 0.83 |
lightgreen | 0.56 | 0.93 | 0.56 |
lightgrey | 0.83 | 0.83 | 0.83 |
lightpink1 | 1 | 0.68 | 0.73 |
lightpink2 | 0.93 | 0.64 | 0.68 |
lightpink3 | 0.8 | 0.55 | 0.58 |
lightpink4 | 0.55 | 0.37 | 0.4 |
lightpink | 1 | 0.71 | 0.76 |
lightsalmon1 | 1 | 0.63 | 0.48 |
lightsalmon2 | 0.93 | 0.58 | 0.45 |
lightsalmon3 | 0.8 | 0.51 | 0.38 |
lightsalmon4 | 0.55 | 0.34 | 0.26 |
lightsalmon | 1 | 0.63 | 0.48 |
lightseagreen | 0.13 | 0.7 | 0.67 |
lightskyblue1 | 0.69 | 0.89 | 1 |
lightskyblue2 | 0.64 | 0.83 | 0.93 |
lightskyblue3 | 0.55 | 0.71 | 0.8 |
lightskyblue4 | 0.38 | 0.48 | 0.55 |
lightskyblue | 0.53 | 0.81 | 0.98 |
lightslateblue | 0.52 | 0.44 | 1 |
lightslategray | 0.47 | 0.53 | 0.6 |
lightslategrey | 0.47 | 0.53 | 0.6 |
lightsteelblue1 | 0.79 | 0.88 | 1 |
lightsteelblue2 | 0.74 | 0.82 | 0.93 |
lightsteelblue3 | 0.64 | 0.71 | 0.8 |
lightsteelblue4 | 0.43 | 0.48 | 0.55 |
lightsteelblue | 0.69 | 0.77 | 0.87 |
lightyellow1 | 1 | 1 | 0.88 |
lightyellow2 | 0.93 | 0.93 | 0.82 |
lightyellow3 | 0.8 | 0.8 | 0.71 |
lightyellow4 | 0.55 | 0.55 | 0.48 |
lightyellow | 1 | 1 | 0.88 |
limegreen | 0.2 | 0.8 | 0.2 |
linen | 0.98 | 0.94 | 0.9 |
magenta1 | 1 | 0 | 1 |
magenta2 | 0.93 | 0 | 0.93 |
magenta3 | 0.8 | 0 | 0.8 |
magenta4 | 0.55 | 0 | 0.55 |
magenta | 0.68 | 0.02 | 0.78 |
maroon1 | 1 | 0.2 | 0.7 |
maroon2 | 0.93 | 0.19 | 0.65 |
maroon3 | 0.8 | 0.16 | 0.56 |
maroon4 | 0.55 | 0.11 | 0.38 |
maroon | 0.69 | 0.19 | 0.38 |
mediumaquamarine | 0.4 | 0.8 | 0.67 |
mediumblue | 0 | 0 | 0.8 |
mediumorchid1 | 0.88 | 0.4 | 1 |
mediumorchid2 | 0.82 | 0.37 | 0.93 |
mediumorchid3 | 0.71 | 0.32 | 0.8 |
mediumorchid4 | 0.48 | 0.22 | 0.55 |
mediumorchid | 0.73 | 0.33 | 0.83 |
mediumpurple1 | 0.67 | 0.51 | 1 |
mediumpurple2 | 0.62 | 0.47 | 0.93 |
mediumpurple3 | 0.54 | 0.41 | 0.8 |
mediumpurple4 | 0.36 | 0.28 | 0.55 |
mediumpurple | 0.58 | 0.44 | 0.86 |
mediumseagreen | 0.24 | 0.7 | 0.44 |
mediumslateblue | 0.48 | 0.41 | 0.93 |
mediumspringgreen | 0 | 0.98 | 0.6 |
mediumturquoise | 0.28 | 0.82 | 0.8 |
mediumvioletred | 0.78 | 0.08 | 0.52 |
midnightblue | 0.1 | 0.1 | 0.44 |
mintcream | 0.96 | 1 | 0.98 |
mistyrose1 | 1 | 0.89 | 0.88 |
mistyrose2 | 0.93 | 0.84 | 0.82 |
mistyrose3 | 0.8 | 0.72 | 0.71 |
mistyrose4 | 0.55 | 0.49 | 0.48 |
mistyrose | 1 | 0.89 | 0.88 |
moccasin | 1 | 0.89 | 0.71 |
navajowhite1 | 1 | 0.87 | 0.68 |
navajowhite2 | 0.93 | 0.81 | 0.63 |
navajowhite3 | 0.8 | 0.7 | 0.55 |
navajowhite4 | 0.55 | 0.47 | 0.37 |
navajowhite | 1 | 0.87 | 0.68 |
navy | 0 | 0 | 0.5 |
navyblue | 0 | 0 | 0.5 |
oldlace | 0.99 | 0.96 | 0.9 |
olivedrab1 | 0.75 | 1 | 0.24 |
olivedrab2 | 0.7 | 0.93 | 0.23 |
olivedrab3 | 0.6 | 0.8 | 0.2 |
olivedrab4 | 0.41 | 0.55 | 0.13 |
olivedrab | 0.42 | 0.56 | 0.14 |
orange1 | 1 | 0.65 | 0 |
orange2 | 0.93 | 0.6 | 0 |
orange3 | 0.8 | 0.52 | 0 |
orange4 | 0.55 | 0.35 | 0 |
orange | 1 | 0.65 | 0 |
orangered1 | 1 | 0.27 | 0 |
orangered2 | 0.93 | 0.25 | 0 |
orangered3 | 0.8 | 0.22 | 0 |
orangered4 | 0.55 | 0.15 | 0 |
orangered | 1 | 0.27 | 0 |
orchid1 | 1 | 0.51 | 0.98 |
orchid2 | 0.93 | 0.48 | 0.91 |
orchid3 | 0.8 | 0.41 | 0.79 |
orchid4 | 0.55 | 0.28 | 0.54 |
orchid | 0.85 | 0.44 | 0.84 |
palegoldenrod | 0.93 | 0.91 | 0.67 |
palegreen1 | 0.6 | 1 | 0.6 |
palegreen2 | 0.56 | 0.93 | 0.56 |
palegreen3 | 0.49 | 0.8 | 0.49 |
palegreen4 | 0.33 | 0.55 | 0.33 |
palegreen | 0.6 | 0.98 | 0.6 |
paleturquoise1 | 0.73 | 1 | 1 |
paleturquoise2 | 0.68 | 0.93 | 0.93 |
paleturquoise3 | 0.59 | 0.8 | 0.8 |
paleturquoise4 | 0.4 | 0.55 | 0.55 |
paleturquoise | 0.69 | 0.93 | 0.93 |
palevioletred1 | 1 | 0.51 | 0.67 |
palevioletred2 | 0.93 | 0.47 | 0.62 |
palevioletred3 | 0.8 | 0.41 | 0.54 |
palevioletred4 | 0.55 | 0.28 | 0.36 |
palevioletred | 0.86 | 0.44 | 0.58 |
papayawhip | 1 | 0.94 | 0.84 |
peachpuff1 | 1 | 0.85 | 0.73 |
peachpuff2 | 0.93 | 0.8 | 0.68 |
peachpuff3 | 0.8 | 0.69 | 0.58 |
peachpuff4 | 0.55 | 0.47 | 0.4 |
peachpuff | 1 | 0.85 | 0.73 |
peru | 0.8 | 0.52 | 0.25 |
pink1 | 1 | 0.71 | 0.77 |
pink2 | 0.93 | 0.66 | 0.72 |
pink3 | 0.8 | 0.57 | 0.62 |
pink4 | 0.55 | 0.39 | 0.42 |
pink | 1 | 0.75 | 0.8 |
plum1 | 1 | 0.73 | 1 |
plum2 | 0.93 | 0.68 | 0.93 |
plum3 | 0.8 | 0.59 | 0.8 |
plum4 | 0.55 | 0.4 | 0.55 |
plum | 0.87 | 0.63 | 0.87 |
powderblue | 0.69 | 0.88 | 0.9 |
purple1 | 0.61 | 0.19 | 1 |
purple2 | 0.57 | 0.17 | 0.93 |
purple3 | 0.49 | 0.15 | 0.8 |
purple4 | 0.33 | 0.1 | 0.55 |
purple | 0.63 | 0.13 | 0.94 |
red1 | 1 | 0 | 0 |
red2 | 0.93 | 0 | 0 |
red3 | 0.8 | 0 | 0 |
red4 | 0.55 | 0 | 0 |
red | 1 | 0 | 0 |
rosybrown1 | 1 | 0.76 | 0.76 |
rosybrown2 | 0.93 | 0.71 | 0.71 |
rosybrown3 | 0.8 | 0.61 | 0.61 |
rosybrown4 | 0.55 | 0.41 | 0.41 |
rosybrown | 0.74 | 0.56 | 0.56 |
royalblue1 | 0.28 | 0.46 | 1 |
royalblue2 | 0.26 | 0.43 | 0.93 |
royalblue3 | 0.23 | 0.37 | 0.8 |
royalblue4 | 0.15 | 0.25 | 0.55 |
royalblue | 0.25 | 0.41 | 0.88 |
saddlebrown | 0.55 | 0.27 | 0.07 |
salmon1 | 1 | 0.55 | 0.41 |
salmon2 | 0.93 | 0.51 | 0.38 |
salmon3 | 0.8 | 0.44 | 0.33 |
salmon4 | 0.55 | 0.3 | 0.22 |
salmon | 0.98 | 0.5 | 0.45 |
sandybrown | 0.96 | 0.64 | 0.38 |
seagreen1 | 0.33 | 1 | 0.62 |
seagreen2 | 0.31 | 0.93 | 0.58 |
seagreen3 | 0.26 | 0.8 | 0.5 |
seagreen4 | 0.18 | 0.55 | 0.34 |
seagreen | 0.18 | 0.55 | 0.34 |
seashell1 | 1 | 0.96 | 0.93 |
seashell2 | 0.93 | 0.9 | 0.87 |
seashell3 | 0.8 | 0.77 | 0.75 |
seashell4 | 0.55 | 0.53 | 0.51 |
seashell | 1 | 0.96 | 0.93 |
sienna1 | 1 | 0.51 | 0.28 |
sienna2 | 0.93 | 0.47 | 0.26 |
sienna3 | 0.8 | 0.41 | 0.22 |
sienna4 | 0.55 | 0.28 | 0.15 |
sienna | 0.63 | 0.32 | 0.18 |
skyblue1 | 0.53 | 0.81 | 1 |
skyblue2 | 0.49 | 0.75 | 0.93 |
skyblue3 | 0.42 | 0.65 | 0.8 |
skyblue4 | 0.29 | 0.44 | 0.55 |
skyblue | 0.53 | 0.81 | 0.92 |
slateblue1 | 0.51 | 0.44 | 1 |
slateblue2 | 0.48 | 0.4 | 0.93 |
slateblue3 | 0.41 | 0.35 | 0.8 |
slateblue4 | 0.28 | 0.24 | 0.55 |
slateblue | 0.42 | 0.35 | 0.8 |
slategray1 | 0.78 | 0.89 | 1 |
slategray2 | 0.73 | 0.83 | 0.93 |
slategray3 | 0.62 | 0.71 | 0.8 |
slategray4 | 0.42 | 0.48 | 0.55 |
slategray | 0.44 | 0.5 | 0.56 |
slategrey | 0.44 | 0.5 | 0.56 |
snow1 | 1 | 0.98 | 0.98 |
snow2 | 0.93 | 0.91 | 0.91 |
snow3 | 0.8 | 0.79 | 0.79 |
snow4 | 0.55 | 0.54 | 0.54 |
snow | 1 | 0.98 | 0.98 |
springgreen1 | 0 | 1 | 0.5 |
springgreen2 | 0 | 0.93 | 0.46 |
springgreen3 | 0 | 0.8 | 0.4 |
springgreen4 | 0 | 0.55 | 0.27 |
springgreen | 0 | 1 | 0.5 |
steelblue1 | 0.39 | 0.72 | 1 |
steelblue2 | 0.36 | 0.67 | 0.93 |
steelblue3 | 0.31 | 0.58 | 0.8 |
steelblue4 | 0.21 | 0.39 | 0.55 |
steelblue | 0.27 | 0.51 | 0.71 |
tan1 | 1 | 0.65 | 0.31 |
tan2 | 0.93 | 0.6 | 0.29 |
tan3 | 0.8 | 0.52 | 0.25 |
tan4 | 0.55 | 0.35 | 0.17 |
tan | 0.82 | 0.71 | 0.55 |
thistle1 | 1 | 0.88 | 1 |
thistle2 | 0.93 | 0.82 | 0.93 |
thistle3 | 0.8 | 0.71 | 0.8 |
thistle4 | 0.55 | 0.48 | 0.55 |
thistle | 0.85 | 0.75 | 0.85 |
tomato1 | 1 | 0.39 | 0.28 |
tomato2 | 0.93 | 0.36 | 0.26 |
tomato3 | 0.8 | 0.31 | 0.22 |
tomato4 | 0.55 | 0.21 | 0.15 |
tomato | 1 | 0.39 | 0.28 |
turquoise1 | 0 | 0.96 | 1 |
turquoise2 | 0 | 0.9 | 0.93 |
turquoise3 | 0 | 0.77 | 0.8 |
turquoise4 | 0 | 0.53 | 0.55 |
turquoise | 0.25 | 0.88 | 0.82 |
violet | 0.93 | 0.51 | 0.93 |
violetred1 | 1 | 0.24 | 0.59 |
violetred2 | 0.93 | 0.23 | 0.55 |
violetred3 | 0.8 | 0.2 | 0.47 |
violetred4 | 0.55 | 0.13 | 0.32 |
violetred | 0.82 | 0.13 | 0.56 |
wheat1 | 1 | 0.91 | 0.73 |
wheat2 | 0.93 | 0.85 | 0.68 |
wheat3 | 0.8 | 0.73 | 0.59 |
wheat4 | 0.55 | 0.49 | 0.4 |
wheat | 0.96 | 0.87 | 0.7 |
white | 1 | 1 | 1 |
whitesmoke | 0.96 | 0.96 | 0.96 |
yellow1 | 1 | 1 | 0 |
yellow2 | 0.93 | 0.93 | 0 |
yellow3 | 0.8 | 0.8 | 0 |
yellow4 | 0.55 | 0.55 | 0 |
yellow | 1 | 1 | 0 |
yellowgreen | 0.6 | 0.8 | 0.2 |
Examples
Here are a few basic examples which can be executed one by one in the
Tcl Shell (⌘Y
).
Get list of colors:
«» colorRef names
Get a color by name
«» colorRef named lavender
Create colors in various colorspaces
«» colorRef create -space GRAY 0.2
«» colorRef create -space GRAY 0.2 0.5
«» colorRef create -space RGB 0.2 0.3 0.4
«» colorRef create -space RGB 0.2 0.3 0.4 0.5
«» colorRef create -space HSB 0.2 0.3 0.4
«» colorRef create -space HSB 0.2 0.3 0.4 0.5
«» colorRef create -space CYMK 0.2 0.3 0.4 0.5
Convert components between colorspaces:
«» set comps [list 0.2 0.3 0.4 0.5]
«» set colToken [colorRef create -space RGB {*}$comps]
«» colorRef components -space CYMK $colToken
«» set comps [list 0.2 0.5]
«» set colToken [colorRef create -space GRAY {*}$comps]
«» colorRef components -space RGB -alpha 1 $colToken
Delete a color reference:
«» colorRef delete $colToken
Last updated 2019-10-17 13:29:19