Difference between revisions of "Color"
m (→X11 Colors: Added Crayola Colors) |
m (Added RAL colors) |
||
Line 624: | Line 624: | ||
|SunsetPearl||bgcolor="F1CC79" | | |SunsetPearl||bgcolor="F1CC79" | | ||
|} | |} | ||
+ | |||
+ | == RAL colors == | ||
+ | |||
+ | RAL color system (Deutsches Institut für Gütesicherung und Kennzeichnung) | ||
+ | approximate RGB colors (from [[http://www.ralcolor.com]] | ||
+ | see also [[ralcolors.com]]). These can be loaded using | ||
+ | |||
+ | <texcode>\usecolors[ral]</texcode> | ||
+ | |||
+ | {| style="text-align: right; padding-right: 20px;" | ||
+ | !| Name !! Color | ||
+ | !style="width: 100px;"| Name !! Color | ||
+ | !style="width: 100px;"| Name !! Color | ||
+ | !style="width: 100px;"| Name !! Color | ||
+ | !style="width: 100px;"| Name !! Color | ||
+ | !style="width: 100px;"| Name !! Color | ||
+ | |- | ||
+ | |RAL1000||bgcolor="BEBD7F" | | ||
+ | |RAL1001||bgcolor="C2B078" | | ||
+ | |RAL1002||bgcolor="C6A664" | | ||
+ | |RAL1003||bgcolor="E5BE01" | | ||
+ | |RAL1004||bgcolor="CDA434" | | ||
+ | |RAL1005||bgcolor="A98307" | | ||
+ | |- | ||
+ | |RAL1006||bgcolor="E4A010" | | ||
+ | |RAL1007||bgcolor="DC9D00" | | ||
+ | |RAL1011||bgcolor="8A6642" | | ||
+ | |RAL1012||bgcolor="C7B446" | | ||
+ | |RAL1013||bgcolor="EAE6CA" | | ||
+ | |RAL1014||bgcolor="E1CC4F" | | ||
+ | |- | ||
+ | |RAL1015||bgcolor="E6D690" | | ||
+ | |RAL1016||bgcolor="EDFF21" | | ||
+ | |RAL1017||bgcolor="F5D033" | | ||
+ | |RAL1018||bgcolor="F8F32B" | | ||
+ | |RAL1019||bgcolor="9E9764" | | ||
+ | |RAL1020||bgcolor="999950" | | ||
+ | |- | ||
+ | |RAL1021||bgcolor="F3DA0B" | | ||
+ | |RAL1023||bgcolor="FAD201" | | ||
+ | |RAL1024||bgcolor="AEA04B" | | ||
+ | |RAL1026||bgcolor="FFFF00" | | ||
+ | |RAL1027||bgcolor="9D9101" | | ||
+ | |RAL1028||bgcolor="F4A900" | | ||
+ | |- | ||
+ | |RAL1032||bgcolor="D6AE01" | | ||
+ | |RAL1033||bgcolor="F3A505" | | ||
+ | |RAL1034||bgcolor="EFA94A" | | ||
+ | |RAL1035||bgcolor="6A5D4D" | | ||
+ | |RAL1036||bgcolor="705335" | | ||
+ | |RAL1037||bgcolor="F39F18" | | ||
+ | |- | ||
+ | |RAL2000||bgcolor="ED760E" | | ||
+ | |RAL2001||bgcolor="C93C20" | | ||
+ | |RAL2002||bgcolor="CB2821" | | ||
+ | |RAL2003||bgcolor="FF7514" | | ||
+ | |RAL2004||bgcolor="F44611" | | ||
+ | |RAL2005||bgcolor="FF2301" | | ||
+ | |- | ||
+ | |RAL2007||bgcolor="FFA420" | | ||
+ | |RAL2008||bgcolor="F75E25" | | ||
+ | |RAL2009||bgcolor="F54021" | | ||
+ | |RAL2010||bgcolor="D84B20" | | ||
+ | |RAL2011||bgcolor="EC7C26" | | ||
+ | |RAL2012||bgcolor="E55137" | | ||
+ | |- | ||
+ | |RAL2013||bgcolor="C35831" | | ||
+ | |RAL3000||bgcolor="AF2B1E" | | ||
+ | |RAL3001||bgcolor="A52019" | | ||
+ | |RAL3002||bgcolor="A2231D" | | ||
+ | |RAL3003||bgcolor="9B111E" | | ||
+ | |RAL3004||bgcolor="75151E" | | ||
+ | |- | ||
+ | |RAL3005||bgcolor="5E2129" | | ||
+ | |RAL3007||bgcolor="412227" | | ||
+ | |RAL3009||bgcolor="642424" | | ||
+ | |RAL3011||bgcolor="781F19" | | ||
+ | |RAL3012||bgcolor="C1876B" | | ||
+ | |RAL3013||bgcolor="A12312" | | ||
+ | |- | ||
+ | |RAL3014||bgcolor="D36E70" | | ||
+ | |RAL3015||bgcolor="EA899A" | | ||
+ | |RAL3016||bgcolor="B32821" | | ||
+ | |RAL3017||bgcolor="E63244" | | ||
+ | |RAL3018||bgcolor="D53032" | | ||
+ | |RAL3020||bgcolor="CC0605" | | ||
+ | |- | ||
+ | |RAL3022||bgcolor="D95030" | | ||
+ | |RAL3024||bgcolor="F80000" | | ||
+ | |RAL3026||bgcolor="FE0000" | | ||
+ | |RAL3027||bgcolor="C51D34" | | ||
+ | |RAL3028||bgcolor="CB3234" | | ||
+ | |RAL3031||bgcolor="B32428" | | ||
+ | |- | ||
+ | |RAL3032||bgcolor="721422" | | ||
+ | |RAL3033||bgcolor="B44C43" | | ||
+ | |RAL4001||bgcolor="6D3F5B" | | ||
+ | |RAL4002||bgcolor="922B3E" | | ||
+ | |RAL4003||bgcolor="DE4C8A" | | ||
+ | |RAL4004||bgcolor="641C34" | | ||
+ | |- | ||
+ | |RAL4005||bgcolor="6C4675" | | ||
+ | |RAL4006||bgcolor="A03472" | | ||
+ | |RAL4007||bgcolor="4A192C" | | ||
+ | |RAL4008||bgcolor="924E7D" | | ||
+ | |RAL4009||bgcolor="A18594" | | ||
+ | |RAL4010||bgcolor="CF3476" | | ||
+ | |- | ||
+ | |RAL4011||bgcolor="8673A1" | | ||
+ | |RAL4012||bgcolor="6C6874" | | ||
+ | |RAL5000||bgcolor="354D73" | | ||
+ | |RAL5001||bgcolor="1F3438" | | ||
+ | |RAL5002||bgcolor="20214F" | | ||
+ | |RAL5003||bgcolor="1D1E33" | | ||
+ | |- | ||
+ | |RAL5004||bgcolor="18171C" | | ||
+ | |RAL5005||bgcolor="1E2460" | | ||
+ | |RAL5007||bgcolor="3E5F8A" | | ||
+ | |RAL5008||bgcolor="26252D" | | ||
+ | |RAL5009||bgcolor="025669" | | ||
+ | |RAL5010||bgcolor="0E294B" | | ||
+ | |- | ||
+ | |RAL5011||bgcolor="231A24" | | ||
+ | |RAL5012||bgcolor="3B83BD" | | ||
+ | |RAL5013||bgcolor="1E213D" | | ||
+ | |RAL5014||bgcolor="606E8C" | | ||
+ | |RAL5015||bgcolor="2271B3" | | ||
+ | |RAL5017||bgcolor="063971" | | ||
+ | |- | ||
+ | |RAL5018||bgcolor="3F888F" | | ||
+ | |RAL5019||bgcolor="1B5583" | | ||
+ | |RAL5020||bgcolor="1D334A" | | ||
+ | |RAL5021||bgcolor="256D7B" | | ||
+ | |RAL5022||bgcolor="252850" | | ||
+ | |RAL5023||bgcolor="49678D" | | ||
+ | |- | ||
+ | |RAL5024||bgcolor="5D9B9B" | | ||
+ | |RAL5025||bgcolor="2A6478" | | ||
+ | |RAL5026||bgcolor="102C54" | | ||
+ | |RAL6000||bgcolor="316650" | | ||
+ | |RAL6001||bgcolor="287233" | | ||
+ | |RAL6002||bgcolor="2D572C" | | ||
+ | |- | ||
+ | |RAL6003||bgcolor="424632" | | ||
+ | |RAL6004||bgcolor="1F3A3D" | | ||
+ | |RAL6005||bgcolor="2F4538" | | ||
+ | |RAL6006||bgcolor="3E3B32" | | ||
+ | |RAL6007||bgcolor="343B29" | | ||
+ | |RAL6008||bgcolor="39352A" | | ||
+ | |- | ||
+ | |RAL6009||bgcolor="31372B" | | ||
+ | |RAL6010||bgcolor="35682D" | | ||
+ | |RAL6011||bgcolor="587246" | | ||
+ | |RAL6012||bgcolor="343E40" | | ||
+ | |RAL6013||bgcolor="6C7156" | | ||
+ | |RAL6014||bgcolor="47402E" | | ||
+ | |- | ||
+ | |RAL6015||bgcolor="3B3C36" | | ||
+ | |RAL6016||bgcolor="1E5945" | | ||
+ | |RAL6017||bgcolor="4C9141" | | ||
+ | |RAL6018||bgcolor="57A639" | | ||
+ | |RAL6019||bgcolor="BDECB6" | | ||
+ | |RAL6020||bgcolor="2E3A23" | | ||
+ | |- | ||
+ | |RAL6021||bgcolor="89AC76" | | ||
+ | |RAL6022||bgcolor="25221B" | | ||
+ | |RAL6024||bgcolor="308446" | | ||
+ | |RAL6025||bgcolor="3D642D" | | ||
+ | |RAL6026||bgcolor="015D52" | | ||
+ | |RAL6027||bgcolor="84C3BE" | | ||
+ | |- | ||
+ | |RAL6028||bgcolor="2C5545" | | ||
+ | |RAL6029||bgcolor="20603D" | | ||
+ | |RAL6032||bgcolor="317F43" | | ||
+ | |RAL6033||bgcolor="497E76" | | ||
+ | |RAL6034||bgcolor="7FB5B5" | | ||
+ | |RAL6035||bgcolor="1C542D" | | ||
+ | |- | ||
+ | |RAL6036||bgcolor="193737" | | ||
+ | |RAL6037||bgcolor="008F39" | | ||
+ | |RAL6038||bgcolor="00BB2D" | | ||
+ | |RAL7000||bgcolor="78858B" | | ||
+ | |RAL7001||bgcolor="8A9597" | | ||
+ | |RAL7002||bgcolor="7E7B52" | | ||
+ | |- | ||
+ | |RAL7003||bgcolor="6C7059" | | ||
+ | |RAL7004||bgcolor="969992" | | ||
+ | |RAL7005||bgcolor="646B63" | | ||
+ | |RAL7006||bgcolor="6D6552" | | ||
+ | |RAL7008||bgcolor="6A5F31" | | ||
+ | |RAL7009||bgcolor="4D5645" | | ||
+ | |- | ||
+ | |RAL7010||bgcolor="4C514A" | | ||
+ | |RAL7011||bgcolor="434B4D" | | ||
+ | |RAL7012||bgcolor="4E5754" | | ||
+ | |RAL7013||bgcolor="464531" | | ||
+ | |RAL7015||bgcolor="434750" | | ||
+ | |RAL7016||bgcolor="293133" | | ||
+ | |- | ||
+ | |RAL7021||bgcolor="23282B" | | ||
+ | |RAL7022||bgcolor="332F2C" | | ||
+ | |RAL7023||bgcolor="686C5E" | | ||
+ | |RAL7024||bgcolor="474A51" | | ||
+ | |RAL7026||bgcolor="2F353B" | | ||
+ | |RAL7030||bgcolor="8B8C7A" | | ||
+ | |- | ||
+ | |RAL7031||bgcolor="474B4E" | | ||
+ | |RAL7032||bgcolor="B8B799" | | ||
+ | |RAL7033||bgcolor="7D8471" | | ||
+ | |RAL7034||bgcolor="8F8B66" | | ||
+ | |RAL7035||bgcolor="D7D7D7" | | ||
+ | |RAL7036||bgcolor="7F7679" | | ||
+ | |- | ||
+ | |RAL7037||bgcolor="7D7F7D" | | ||
+ | |RAL7038||bgcolor="B5B8B1" | | ||
+ | |RAL7039||bgcolor="6C6960" | | ||
+ | |RAL7040||bgcolor="9DA1AA" | | ||
+ | |RAL7042||bgcolor="8D948D" | | ||
+ | |RAL7043||bgcolor="4E5452" | | ||
+ | |- | ||
+ | |RAL7044||bgcolor="CAC4B0" | | ||
+ | |RAL7045||bgcolor="909090" | | ||
+ | |RAL7046||bgcolor="82898F" | | ||
+ | |RAL7047||bgcolor="D0D0D0" | | ||
+ | |RAL7048||bgcolor="898176" | | ||
+ | |RAL8000||bgcolor="826C34" | | ||
+ | |- | ||
+ | |RAL8001||bgcolor="955F20" | | ||
+ | |RAL8002||bgcolor="6C3B2A" | | ||
+ | |RAL8003||bgcolor="734222" | | ||
+ | |RAL8004||bgcolor="8E402A" | | ||
+ | |RAL8007||bgcolor="59351F" | | ||
+ | |RAL8008||bgcolor="6F4F28" | | ||
+ | |- | ||
+ | |RAL8011||bgcolor="5B3A29" | | ||
+ | |RAL8012||bgcolor="592321" | | ||
+ | |RAL8014||bgcolor="382C1E" | | ||
+ | |RAL8015||bgcolor="633A34" | | ||
+ | |RAL8016||bgcolor="4C2F27" | | ||
+ | |RAL8017||bgcolor="45322E" | | ||
+ | |- | ||
+ | |RAL8019||bgcolor="403A3A" | | ||
+ | |RAL8022||bgcolor="212121" | | ||
+ | |RAL8023||bgcolor="A65E2E" | | ||
+ | |RAL8024||bgcolor="79553D" | | ||
+ | |RAL8025||bgcolor="755C48" | | ||
+ | |RAL8028||bgcolor="4E3B31" | | ||
+ | |- | ||
+ | |RAL8029||bgcolor="763C28" | | ||
+ | |RAL9001||bgcolor="FDF4E3" | | ||
+ | |RAL9002||bgcolor="E7EBDA" | | ||
+ | |RAL9003||bgcolor="F4F4F4" | | ||
+ | |RAL9004||bgcolor="282828" | | ||
+ | |RAL9005||bgcolor="0A0A0A" | | ||
+ | |- | ||
+ | |RAL9006||bgcolor="A5A5A5" | | ||
+ | |RAL9007||bgcolor="8F8F8F" | | ||
+ | |RAL9010||bgcolor="FFFFFF" | | ||
+ | |RAL9011||bgcolor="1C1C1C" | | ||
+ | |RAL9016||bgcolor="F6F6F6" | | ||
+ | |RAL9017||bgcolor="1E1E1E" | | ||
+ | |- | ||
+ | |RAL9018||bgcolor="D7D7D7" | | ||
+ | |RAL9022||bgcolor="9C9C9C" | | ||
+ | |RAL9023||bgcolor="828282" | | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
== Additional pre-defined colors == | == Additional pre-defined colors == |
Revision as of 04:22, 8 June 2020
-
- Overview
- Color
- Color in MetaPost
-
- Cmd general
- \color
- \MPcolor
- \definecolor
- \setupcolors
- \showcolor
- \usecolor
-
- Cmd Logical palettes
- \definepalet
- \setuppalet
- \showpalet
- \comparepalet
-
- Grps of similar colors
- \definecolorgroup
- \showcolorgroup
-
- Src MkIV color def
- colo-imp-dem.mkiv
- colo-imp-rgb.mkiv
- colo-imp-xwi.mkiv
- colo-imp-ema.mkiv
- colo-imp-x11.mkiv
Contents
Before you start ...
1. It’s usually bad style to use explicit color switches in the text. It’s better to define a semantic command that takes care of the color switching. For example, instead of using \color[red]{important text}
, define
\definehighlight[important][color=red]
and then use \important{important text}
in the text.
2. Colors are not enabled by default in MkII. To enable colors in MkII, use
\setupcolors[state=start]
3. To disable colors in a document, use
\setupcolors[state=stop]
Last manual dedicated to color was issued in 2016
Basic Usage
To color text, use
\color[defined-color]{ ... text ... }
or
\startcolor[defined-color] ... text ... \stopcolor
where defined-color
is a color defined using \definecolor. For example, red
is one of the predefined colors. So, we can use:
Three \color[red]{cool} cats |
or
\startcolor[red] \input tufte \stopcolor
It is also possible to use RGB or CMYK or hex values to color text. The syntax for these is
\colored[settings]{... text ...}
where settings
are the same settings as used by \definecolor. For example:
Three \colored[r=0.1, g=0.8, b=0.8]{colorful} cats |
Note. There is no need to use the color commands directly. Almost all ConTeXt commands accept a color
key, and you can use color=defined-color
. For example,
- To color the section titles red, use
\setuphead[color=red]
- To color the footnotes red, use
\setupfootnotes[color=red]
etc.
Pre-defined colors
Default pre-defined colors
The following colors are pre-defined in ConTeXt (see colo-imp-rgb.mkiv).
Name | Color | Name | Color | Name | Color | Name | Color |
---|---|---|---|---|---|---|---|
black | white | ||||||
gray | lightgray | middlegray | darkgray | ||||
red | lightred | middlered | darkred | ||||
green | lightgreen | middlegreen | darkgreen | ||||
blue | lightblue | middleblue | darkblue | ||||
cyan | middlecyan | darkcyan | |||||
magenta | middlemagenta | darkmagenta | |||||
yellow | middleyellow | darkyellow |
X11 Colors
In addition to the above basic color, ConTeXt also includes a definition of the X11 colors. To load this list (colo-imp-xwi.mkiv), use
\usecolors[xwi]
This loads the following additional colors:
Name | Color | Name | Color | Name | Color | Name | Color |
---|---|---|---|---|---|---|---|
aliceblue | antiquewhite | aquamarine | azure | ||||
beige | bisque | black | blanchedalmond | ||||
blue | blueviolet | brown | burlywood | ||||
cadetblue | chartreuse | chocolate | coral | ||||
cornflowerblue | cornsilk | cyan | darkgoldenrod | ||||
darkgreen | darkkhaki | darkolivegreen | darkorange | ||||
darkorchid | darksalmon | darkseagreen | darkslateblue | ||||
darkturquoise | darkviolet | deeppink | deepskyblue | ||||
dodgerblue | firebrick | floralwhite | forestgreen | ||||
gainsboro | ghostwhite | gold | goldenrod | ||||
green | greenyellow | honeydew | hotpink | ||||
indianred | ivory | khaki | lavender | ||||
lavenderblush | lawngreen | lemonchiffon | lightblue | ||||
lightcoral | lightcyan | lightgoldenrod | lightgoldenrodyellow | ||||
lightpink | lightsalmon | lightseagreen | lightskyblue | ||||
lightslateblue | lightsteelblue | lightyellow | limegreen | ||||
linen | magenta | maroon | mediumaquamarine | ||||
mediumblue | mediumorchid | mediumpurple | mediumseagreen | ||||
mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | ||||
midnightblue | mintcream | mistyrose | moccasin | ||||
navajowhite | navy | navyblue | oldlace | ||||
olivedrab | orange | orangered | orchid | ||||
palegoldenrod | palegreen | paleturquoise | palevioletred | ||||
papayawhip | peachpuff | peru | pink | ||||
plum | powderblue | purple | red | ||||
rosybrown | royalblue | saddlebrown | salmon | ||||
sandybrown | seagreen | seashell | sienna | ||||
skyblue | slateblue | snow | springgreen | ||||
steelblue | tan | thistle | tomato | ||||
turquoise | violet | violetred | wheat | ||||
white | whitesmoke | yellow | yellowgreen |
Crayola crayon colors
The following colors are defined in colo-imp-crayola.mkiv. These can be loaded using
\usecolors[crayola]
Name | Color | Name | Color | Name | Color | Name | Color |
---|---|---|---|---|---|---|---|
Red | Maroon | Scarlet | BrickRed | ||||
EnglishVermilion | MadderLake | PermanentGeraniumLake | MaximumRed | ||||
IndianRed | OrangeRed | SunsetOrange | Bittersweet | ||||
DarkVenetianRed | VenetianRed | LightVenetianRed | VividTangerine | ||||
MiddleRed | BurntOrange | RedOrange | Orange | ||||
MacaroniandCheese | MiddleYellowRed | MangoTango | YellowOrange | ||||
MaximumYellowRed | BananaMania | Maize | OrangeYellow | ||||
Goldenrod | Dandelion | Yellow | GreenYellow | ||||
MiddleYellow | OliveGreen | SpringGreen | MaximumYellow | ||||
Canary | LemonYellow | MaximumGreenYellow | MiddleGreenYellow | ||||
Inchworm | LightChromeGreen | YellowGreen | MaximumGreen | ||||
Asparagus | GrannySmithApple | Fern | MiddleGreen | ||||
Green | MediumChromeGreen | ForestGreen | SeaGreen | ||||
Shamrock | MountainMeadow | JungleGreen | CaribbeanGreen | ||||
TropicalRainForest | MiddleBlueGreen | PineGreen | MaximumBlueGreen | ||||
RobinsEggBlue | TealBlue | LightBlue | Aquamarine | ||||
TurquoiseBlue | OuterSpace | SkyBlue | MiddleBlue | ||||
BlueGreen | PacificBlue | Cerulean | MaximumBlue | ||||
BlueI | CeruleanBlue | Cornflower | GreenBlue | ||||
MidnightBlue | NavyBlue | Denim | BlueIII | ||||
CadetBlue | Periwinkle | BlueII | WildBlueYonder | ||||
Indigo | Manatee | CobaltBlue | CelestialBlue | ||||
BlueBell | MaximumBluePurple | VioletBlue | BlueViolet | ||||
UltramarineBlue | MiddleBluePurple | PurpleHeart | RoyalPurple | ||||
VioletII | MediumViolet | Wisteria | LavenderI | ||||
VividViolet | MaximumPurple | PurpleMountainsMajesty | Fuchsia | ||||
PinkFlamingo | VioletI | BrilliantRose | Orchid | ||||
Plum | MediumRose | Thistle | Mulberry | ||||
RedViolet | MiddlePurple | MaximumRedPurple | JazzberryJam | ||||
Eggplant | Magenta | Cerise | WildStrawberry | ||||
LavenderII | CottonCandy | CarnationPink | VioletRed | ||||
Razzmatazz | PigPink | Carmine | Blush | ||||
TickleMePink | Mauvelous | Salmon | MiddleRedPurple | ||||
Mahogany | Melon | PinkSherbert | BurntSienna | ||||
Brown | Sepia | FuzzyWuzzy | Beaver | ||||
Tumbleweed | RawSienna | VanDykeBrown | Tan | ||||
DesertSand | Peach | BurntUmber | Apricot | ||||
Almond | RawUmber | Shadow | RawSiennaI | ||||
Timberwolf | GoldI | GoldII | Silver | ||||
Copper | AntiqueBrass | Black | CharcoalGray | ||||
Gray | BlueGray | White | RadicalRed | ||||
WildWatermelon | OutrageousOrange | AtomicTangerine | NeonCarrot | ||||
Sunglow | LaserLemon | UnmellowYellow | ElectricLime | ||||
ScreaminGreen | MagicMint | BlizzardBlue | ShockingPink | ||||
RazzleDazzleRose | HotMagenta | PurplePizzazz | AztecGold | ||||
BurnishedBrown | CeruleanFrost | CinnamonSatin | CopperPenny | ||||
CosmicCobalt | GlossyGrape | GraniteGray | GreenSheen | ||||
LilacLuster | MistyMoss | MysticMaroon | PearlyPurple | ||||
PewterBlue | PolishedPine | QuickSilver | RoseDust | ||||
RustyRed | ShadowBlue | ShinyShamrock | SteelTeal | ||||
SugarPlum | TwilightLavender | WintergreenDream | Amethyst | ||||
Citrine | Emerald | Jade | Jasper | ||||
LapisLazuli | Malachite | Moonstone | Onyx | ||||
Peridot | PinkPearl | RoseQuartz | Ruby | ||||
Sapphire | SmokeyTopaz | TigersEye | AquaPearl | ||||
BlackCoralPearl | CaribbeanGreenPearl | CulturedPearl | KeyLimePearl | ||||
MandarinPearl | MidnightPearl | MysticPearl | OceanBluePearl | ||||
OceanGreenPearl | OrchidPearl | RosePearl | SalmonPearl | ||||
SunnyPearl | SunsetPearl |
RAL colors
RAL color system (Deutsches Institut für Gütesicherung und Kennzeichnung) approximate RGB colors (from [[1]] see also ralcolors.com). These can be loaded using
\usecolors[ral]
Name | Color | Name | Color | Name | Color | Name | Color | Name | Color | Name | Color |
---|---|---|---|---|---|---|---|---|---|---|---|
RAL1000 | RAL1001 | RAL1002 | RAL1003 | RAL1004 | RAL1005 | ||||||
RAL1006 | RAL1007 | RAL1011 | RAL1012 | RAL1013 | RAL1014 | ||||||
RAL1015 | RAL1016 | RAL1017 | RAL1018 | RAL1019 | RAL1020 | ||||||
RAL1021 | RAL1023 | RAL1024 | RAL1026 | RAL1027 | RAL1028 | ||||||
RAL1032 | RAL1033 | RAL1034 | RAL1035 | RAL1036 | RAL1037 | ||||||
RAL2000 | RAL2001 | RAL2002 | RAL2003 | RAL2004 | RAL2005 | ||||||
RAL2007 | RAL2008 | RAL2009 | RAL2010 | RAL2011 | RAL2012 | ||||||
RAL2013 | RAL3000 | RAL3001 | RAL3002 | RAL3003 | RAL3004 | ||||||
RAL3005 | RAL3007 | RAL3009 | RAL3011 | RAL3012 | RAL3013 | ||||||
RAL3014 | RAL3015 | RAL3016 | RAL3017 | RAL3018 | RAL3020 | ||||||
RAL3022 | RAL3024 | RAL3026 | RAL3027 | RAL3028 | RAL3031 | ||||||
RAL3032 | RAL3033 | RAL4001 | RAL4002 | RAL4003 | RAL4004 | ||||||
RAL4005 | RAL4006 | RAL4007 | RAL4008 | RAL4009 | RAL4010 | ||||||
RAL4011 | RAL4012 | RAL5000 | RAL5001 | RAL5002 | RAL5003 | ||||||
RAL5004 | RAL5005 | RAL5007 | RAL5008 | RAL5009 | RAL5010 | ||||||
RAL5011 | RAL5012 | RAL5013 | RAL5014 | RAL5015 | RAL5017 | ||||||
RAL5018 | RAL5019 | RAL5020 | RAL5021 | RAL5022 | RAL5023 | ||||||
RAL5024 | RAL5025 | RAL5026 | RAL6000 | RAL6001 | RAL6002 | ||||||
RAL6003 | RAL6004 | RAL6005 | RAL6006 | RAL6007 | RAL6008 | ||||||
RAL6009 | RAL6010 | RAL6011 | RAL6012 | RAL6013 | RAL6014 | ||||||
RAL6015 | RAL6016 | RAL6017 | RAL6018 | RAL6019 | RAL6020 | ||||||
RAL6021 | RAL6022 | RAL6024 | RAL6025 | RAL6026 | RAL6027 | ||||||
RAL6028 | RAL6029 | RAL6032 | RAL6033 | RAL6034 | RAL6035 | ||||||
RAL6036 | RAL6037 | RAL6038 | RAL7000 | RAL7001 | RAL7002 | ||||||
RAL7003 | RAL7004 | RAL7005 | RAL7006 | RAL7008 | RAL7009 | ||||||
RAL7010 | RAL7011 | RAL7012 | RAL7013 | RAL7015 | RAL7016 | ||||||
RAL7021 | RAL7022 | RAL7023 | RAL7024 | RAL7026 | RAL7030 | ||||||
RAL7031 | RAL7032 | RAL7033 | RAL7034 | RAL7035 | RAL7036 | ||||||
RAL7037 | RAL7038 | RAL7039 | RAL7040 | RAL7042 | RAL7043 | ||||||
RAL7044 | RAL7045 | RAL7046 | RAL7047 | RAL7048 | RAL8000 | ||||||
RAL8001 | RAL8002 | RAL8003 | RAL8004 | RAL8007 | RAL8008 | ||||||
RAL8011 | RAL8012 | RAL8014 | RAL8015 | RAL8016 | RAL8017 | ||||||
RAL8019 | RAL8022 | RAL8023 | RAL8024 | RAL8025 | RAL8028 | ||||||
RAL8029 | RAL9001 | RAL9002 | RAL9003 | RAL9004 | RAL9005 | ||||||
RAL9006 | RAL9007 | RAL9010 | RAL9011 | RAL9016 | RAL9017 | ||||||
RAL9018 | RAL9022 | RAL9023 |
Additional pre-defined colors
In addition to the above, there are other pre-defined colors.
x11 | \usecolors[x11]
|
colo-imp-x11.mkiv | 658 extended Xorg color keywords (WWW), defined in hex RGB |
crayola | \usecolors[crayola]
|
colo-imp-crayola.mkiv | 235 Crayola (Binney & Smith) colors |
ema | \usecolors[ema]
|
colo-imp-ema.mkiv | 549 Emacs colors |
RAL | \usecolors[ral]
|
colo-imp-ral.mkiv | 213 RAL color system (Deutsches Institut für Gütesicherung und Kennzeichnung) |
Solarized | \usecolors[solarized]
|
colo-imp-solarized.mkiv | 16 solarized colors |
Defining New Colors
ConTeXt supports several color models:
- CMYK, typically used for printing
- RGB, HSV/HSL and HWB, typically used for screen display,
- Transparencies,
- Spot colors, typically used for offset printing.
New colors may be defined in the following ways
Name | Syntax (and Example) | Explanation |
---|---|---|
RGB color model | \definecolor[...][r=..., g=..., b=...] For example, \definecolor[lime][r=0.75, g=1, b=0] This is \color[lime]{a new color} that we defined |
The values for r , g , and b are floating point number between 0 and 1 .
|
CMYK color model | \definecolor[...][c=.., m=.., y=.., k=..] For example, \definecolor[lime][c=0.25, m=0, y=1, k=0] This is \color[lime]{a new color} that we defined |
The values for c , m , y and k are floating point number between 0 and 1 .
|
HSV/HSL color model | \definecolor[...][h=.., s=.., v=..] For example, \definecolor[lime][h=75, s=1, v=1] This is \color[lime]{a new color} that we defined |
The value for h (hue) is between 0 and 360 ; the values for s (saturation), v (value/brightness) are floating point numbers between 0 and 1 .
|
HWB color model | \definecolor[...][h=.., w=.., b=..] For example, \definecolor[something][h=75, w=0.5, b=.1] This is \color[something]{a new color} that we defined |
The value for h (hue) is between 0 and 360 ; the values for w (whiteness), b (blackness) are floating point numbers between 0 and 1 . This mostly unknown color model is also used in CSS3/SVG.
|
Hex | \definecolor[...][x=...] For example, \definecolor[lime][x=BFFF00] This is \color[lime]{a new color} that we defined |
The value for x is a three-byte hexadecimal number where the bytes represent the red, green, and blue values. This follows the HTML and CSS style of defining colors.
|
Gray scale | \definecolor[...][s=...] For example, \definecolor[screen][s=0.5] This is \color[screen]{a new color} that we defined |
The value for s is a floating point number between 0 and 1 , representing the grayness value (1 represents white, 0 represents black).
|
Cloning existing colors
You can clone an existing color using
\definecolor[new-color][old-color]
For example
\usecolors[xwi] \definecolor[highlight][yellow] \defineframed [important] [location=low, frame=off, background=color, backgroundcolor=highlight] This is a \important{important}word. \definecolor[highlight][lavenderblush] This is a \important{important}word. |
Adapting existing colors
TODO: add details about this (See: To-Do List) |
Advanced Usage
Changing color of entire document
To change the main text color of the document use
\setupcolors[textcolor=defined-color]
For example,
\setupcolors[textcolor=blue] \starttext text \stoptext |
Changing background color of page
The background color of the page can be changed using
\setupbackgrounds[page][background=color,backgroundcolor=defined-color]
For example,
\setuppapersize[A10] \setupbackgrounds[page][background=color,backgroundcolor=blue] \starttext text \stoptext |
Using colors in MetaPost
A color defined in TeX is available in MetaPost using \MPcolor{...}
. For example:
\definecolor[highlight][r=0.8,g=0.8,b=0] \starttext \color[highlight]{Highlighted text in TeX} \startMPcode label("Highlighted text in MetaPost", origin) withcolor \MPcolor{highlight}; \stopMPcode |
Note that \MPcolor{...}
behaves similar to a color
primitive in MetaPost. For example, the following is valid MetaPost code.
color myColor; myColor = 0.5[\MPcolor{highlight}, white];
For more further reading: Color in MetaPost.
Testing if color is defined
To test if a color is defined, use
Usage:
\doifcolor{color-name}{... if branch ... } \doifcolorelse{color-name}{... if branch ...}{... else branch ...}
Viewing pre-defined color
View all defined colors
To view pre-defined colors, you can use \showcolor. For example, to see all the colors defined in colo-imp-x11.mkiv, use (output truncated for display here ...)
\showcolor[x11] |
If you use \showcolor without any argument, all currently defined colors are shown.
View specific defined colors
To view the components of a defined color, you can use:
\showcolorcomponents[color-1, color-2]
For example,
\showcolorcomponents[red,middlered,darkred] |
\colorcompoents{defined-color} \tranparencycomponents{defined-color} \processcolorcomponents{defined-color}
For example,
\startlines \colorcomponents{red} \transparencycomponents{red} \processcolorcomponents{red} \stoplines |
|
Further reading and specialized topics
- Color Palettes
- Transparency
- Spot Colors
- References
- Paletton - Website to choose color palettes
- ColorBrewer - website to choose colors for maps and graphics.
- Tina Sutton, Bride M Whelan: The Complete Color Harmony. Rockport Publishers (2004). ISBN 978-1592530311 (recommanded in the mailing list)