help colorpalette9 http://repec.sowi.unibe.ch/stata/palettes/ http://github.com/benjann/palettes/ --------------------------------------------------------------------------------------- Title colorpalette9 -- Color palettes (Stata 9) --------------------------------------------------------------------------------------- This is a backward compatible version of the colorpalette command that works in Stata 9.2 or newer. Users of Stata 14.2 or newer can use command colorpalette. --------------------------------------------------------------------------------------- Syntax Syntax 1: Retrieve/display colors from one or multiple palettes colorpalette9 [argument] [, palette_options graph_options ] where argument is palette [[, palette_options] / [ palette [, palette_options] / ... ]] Syntax 2: Display an overview of multiple palettes colorpalette9 [, palette_options graph_options ] : pspec [ / pspec / ... ] where pspec is palette [, palette_options] or . to insert a gap. palette Description --------------------------------------------------------------------------------- Stata palettes (view) s2 15 colors as in Stata's s2color scheme; the default s1 15 colors as in Stata's s1color scheme s1r 15 colors as in Stata's s1rcolor scheme economist 15 colors as in Stata's economist scheme mono 15 gray scales as in Stata's monochrome schemes Other palettes (view) cblind 9 colorblind-friendly by Okabe and Ito (2002) plottig 15 colors as in plottig by Bischof (2017b) 538 6 + 7 colors as in 538 by Bischof (2017a) mrc 7 colors as in mrc by Morris (2013) tfl 8 colors as in tfl by Morris (2015) burd 9 + 4 colors as in burd by Briatte (2013) lean 15 gray scales as in lean by Juul (2003) Color generators hue evenly spaced HCL hues hcl HCL color generator hsv HSV color generator Collections colorbrewer ColorBrewer palettes (colorbrewer2.org) ptol color schemes from Tol (2012) d3 categorical color schemes from D3.js lin semantic colors schemes by Lin et al. (2013) spmap color schemes from spmap by Pisati (2007) sfso color schemes used by the Swiss Federal Statistical Office Custom colorlist custom list of colors myname custom palette provided by program colorpalette9_myname --------------------------------------------------------------------------------- palette_options Description --------------------------------------------------------------------------------- n(#) specify size of palette (number of colors) select(numlist) select/order elements reverse arrange palette in reverse order intensity(numlist) apply color intensity adjustment opacity(numlist) set opacity, in percent ipolate(#) linearly interpolate to # colors other palette-specific options --------------------------------------------------------------------------------- graph_options Description --------------------------------------------------------------------------------- Main title(string) custom graph title gropts(options) options to be passed through to the graph command Syntax 1 only rows(#) minimum number of rows; default is 5 nograph do not generate a graph Syntax 2 only horizontal horizontal plot; the default vertical vertical plot labels(strlist) custom palette labels lcolor(colorstyle) custom outline color lwidth(lwstyle) custom outline thickness --------------------------------------------------------------------------------- Description colorpalette9 is a utility command to retrieve or display color palettes. Palette entries are returned in r(). colorpalette9 is used by grstyle set. Options +-----------------+ ----+ Palette options +---------------------------------------------------------- n(#) specifies the size of the palette (the number of elements). In many cases this just selects the first # elements from the palette and is thus equivalent to select(1/#). However, some color schemes (hue, hcl, hsv, ptol, sequential and diverging ColorBrewer palettes) return colors that adjust to the size of the palette. select(numlist) selects and orders the elements retrieved from the palette. reverse returns the palette in reverse order. intensity(numlist) applies color intensity adjustment. The values in numlist must be between 0 and 255. Values below 1 make the colors lighter; values larger than one make the colors darker. Specify multiple values to use different adjustments across the selected palette elements. The list of adjustments will be recycled if it is shorter than the list of selected palette elements. Likewise, palette elements will be recycled if the list of adjustments is longer than the palette. opacity(numlist) sets the opacity level(s) (0: fully transparent, 100: fully opaque; Stata 15 required). Specify multiple values to use different opacity levels across the selected palette elements. The list of opacity levels will be recycled if it is shorter than the list of selected palette elements. Likewise, palette elements will be recycled if the list of opacity levels is longer than the palette. ipolate(#) linearly interpolates the colors in the palette to # colors (after applying all other options). You can use this option to create color ramps. Interpolation is performed in the color space in which the palette is returned (usually RGB). Intensity adjustment and opacity are also interpolated. Examples: . colorpalette9 cranberry dkorange, ipolate(5) . colorpalette9: RdYlGn / RdYlGn, ipolate(21) other are additional palette-specific options. See the descriptions of the palettes below. +---------------+ ----+ Graph options +------------------------------------------------------------ title(string) specifies a custom title for the graph. gropts(twoway_options) provides options to be passed through to the graph command. rows(#) specifies the minimum number of rows in the graph (syntax 1 only). The default is 5. nograph suppresses the graph (syntax 1 only). horizontal displays the palettes horizontally (syntax 2 only). This is the default. vertical displays the palettes vertically (syntax 2 only). labels(strlist) provides custom labels for the palettes (syntax 2 only). Enclose labels with spaces in double quotes. lcolor(colorstyle) specifies a custom outline color (syntax 2 only). The default is to use the same color for the outline as for the fill. lwidth(linewidthstyle) specifies a custom outline thickness (syntax 2 only). The default is lwidth(vthin). Palettes +----+ ----+ s2 +----------------------------------------------------------------------- Palette s2 (view) contains the 15 colors used for p1 to p15 in Stata's s2color scheme. s2 is the default palette. +----+ ----+ s1 +----------------------------------------------------------------------- Palette s1 (view) contains the colors used for p1 to p15 in Stata's s1color scheme. +-----+ ----+ s1r +---------------------------------------------------------------------- Palette s1r (view) contains the colors used for p1 to p15 in Stata's s1rcolor scheme. +-----------+ ----+ economist +---------------------------------------------------------------- Palette economist (view) contains the colors used for p1 to p15 in Stata's economist scheme. +------+ ----+ mono +--------------------------------------------------------------------- Palette mono (view) contains the gray scales used for p1 to p15 in Stata's monochrome schemes (s2mono, s1mono). +--------+ ----+ cblind +------------------------------------------------------------------- The cblind palette (view) contains colorblind-friendly colors suggested by Okabe and Ito (2002), including gray as suggested at www.cookbook-r.com. The same colors are also used (in different order and using gs10 for gray) in the plotplainblind and plottigblind schemes by Bischof (2017b). Type colorpalette9 cblind, select(1 2 4 5 9 8 7 3 6) for a palette equivalent to the one used in plotplainblind, and colorpalette9 cblind, select(1 4 5 9 8 7 3 6) for plottigblind. +---------+ ----+ plottig +------------------------------------------------------------------ Palette plottig (view) contains the colors used for p1 to p15 in the plottig scheme by Bischof (2017b). Most of these colors are the same as the colors produced by the hue color generator with default options (view), although in different order. +-----+ ----+ 538 +---------------------------------------------------------------------- Palette 538 (view) contains the colors used for p1 to p6, background, labels, axes etc., and CIs in the 538 scheme by Bischof (2017a). The palette replicates colors used at fivethirtyeight.com. +-----+ ----+ mrc +---------------------------------------------------------------------- Palette mrc (view) contains the colors used for p1 to p7 in the mrc scheme by Morris (2013). These are colors according to guidelines by the UK Medical Research Council. +-----+ ----+ tfl +---------------------------------------------------------------------- Palette tfl (view) contains the colors used for p1 to p8 in the tfl scheme by Morris (2015). The palette replicates Transport for London's corporate colors. +------+ ----+ burd +--------------------------------------------------------------------- Palette burd (view) contains the colors used for p1 to p9 and for CIs in the burd scheme by Briatte (2013). The p1 to p9 colors are a selection of colors from various ColorBrewer schemes. +------+ ----+ lean +--------------------------------------------------------------------- Palette lean (view) contains gray scales used for p1area to p15area in schemes lean1 and lean2 by Juul (2003). +-----+ ----+ hue +---------------------------------------------------------------------- The hue palette implements an algorithm that generates HCL colors with evenly spaced hues. The palette has been modeled after function hue_pal() from R's scales package by Hadley Wickham (see http://github.com/hadley/scales). This is the default color scheme used by R's ggplot2 for categorical data (see http://ggplot2.tidyverse.org/reference/scale_hue.html). The hue palette with default options produces the same colors as the intense scheme of the hcl color generator. Syntax: hue [, hue(start end) chroma(#) luminance(#) direction(#) palette_options ] Options: hue(start end) sets the range of hues on the 360 degree color wheel. The default is hue(15 375). If the difference between start and end is a multiple of 360, end will be reduced by 360/n, where n is the number of requested colors (so that the space between the last and the first color is the same as between the other colors). chroma(#) sets the colorfulness (color intensity), with # >= 0. The default is chroma(100). luminance(#) sets the brightness (amount of gray), with # in [0, 100]. The default is luminance(65). direction(#) determines the direction to travel around the color wheel. direction(1), the default, travels clockwise; direction(-1) travels counter-clockwise. Examples: . colorpalette9: hue, n(3) / hue, n(5) / hue, n(7) / hue, n(9) . colorpalette9 hue, n(5) hue(90 -30) chroma(50) luminance(70) +-----+ ----+ hcl +---------------------------------------------------------------------- The hcl palette is a HCL color generator (Hue-Chroma-Luminance). The implementation is based on R's colorspace package by Ihaka et al. (2016). Also see Zeileis et al. (2009) and hclwizard.org. Let h1 and h2 be two hues on the 360 degree color wheel, c1 and c2 two chroma levels, l1 and l2 two luminance levels, p1 and p2 two power parameters, and i an index from 1 to n, where n is the number of requested colors. The HCL colors are then generated according to the following formulas. Qualitative: H = h1 + (h2 - h1) * (i - 1) / (n - 1) C = c1 L = l1 Sequential: H = h2 - (h2 - h1) * j C = c2 - (c2 - c1) * j^p1 L = l2 - (l2 - l1) * j^p2 with j = (n - i) / (n - 1) Diverging: H = cond(j > 0, h1, h2) C = c1 * abs(j)^p1 L = l2 - (l2 - l1) * abs(j)^p2 with j = (n - 2*j + 1) / (n - 1) Syntax: hcl [, scheme hue(h1 [h2]) chroma(c1 [c2]) luminance(l1 [l2]) power(p1 [p2]) palette_options ] Options: scheme picks the type of color formula (qualitative, sequential, or diverging) and sets the default parameter values. scheme can be one of following (qualitative is the default). Qualitative (view) h1 h2 c1 l1 qualitative 15 h1+360*(n-1)/n 60 70 intense 15 h1+360*(n-1)/n 100 65 dark 15 h1+360*(n-1)/n 80 60 light 15 h1+360*(n-1)/n 50 80 pastel 15 h1+360*(n-1)/n 35 85 Sequential (view) h1 h2 c1 c2 l1 l2 p1 p2 sequential 260 h1 80 10 25 95 1 p1 blues 260 h1 80 10 25 95 1 p1 greens 145 125 80 10 25 95 1 p1 grays 0 h1 0 0 15 95 1 p1 oranges 40 h1 100 10 50 95 1 p1 purples 280 h1 70 10 20 95 1 p1 reds 10 20 80 10 25 95 1 p1 heat 0 90 100 30 50 90 0.2 1.0 heat2 0 90 80 30 30 90 0.2 2.0 terrain 130 0 80 0 60 95 0.1 1.0 terrain2 130 30 65 0 45 90 0.5 1.5 viridis 300 75 35 95 15 90 0.8 1.2 plasma 100 h1 60 100 15 95 2.0 0.9 redblue 0 -100 80 40 40 75 1.0 1.0 Diverging (view) h1 h2 c1 l1 l2 p1 p2 diverging 260 0 80 30 95 1 p1 bluered 260 0 80 30 95 1 p1 bluered2 260 0 100 50 95 1 p1 bluered3 180 330 60 75 95 1 p1 greenorange 130 45 100 70 95 1 p1 browngreen 55 160 60 35 95 1 p1 pinkgreen 340 128 90 35 95 1 p1 purplegreen 300 128 60 30 95 1 p1 hue(h1 [h2]) overwrites the default values for h1 and h2. h1 and h2 are hues on the 360 degree color wheel. chroma(c1 [c2]) overwrites the default values for c1 and c2, with c# >= 0. c1 and c2 determine the colorfulness (color intensity). luminance(l1 [l2]) overwrites the default values for l1 and l2, with l# in [0, 100]. l1 and l2 determine the brightness (amount of gray). power(p1 [p2]) overwrites the default values for p1 and p2, with p# > 0. p1 and p2 determine the shape of the transition between chroma and luminance levels. For linear transitions, set p#=1; p#>1 makes the transition faster, p#<1 makes the transition slower. +-----+ ----+ hsv +---------------------------------------------------------------------- The hsv palette is a HSV color generator (Hue-Saturation-Value). The implementation is partially based on R's grDevices package (which is part of the R core) and partially on colorspace by Ihaka et al. (2016). Let h1 and h2 be two hues on the 360 degree color wheel, s1 and s2 two saturation levels, v1 and v2 two value levels, p1 and p2 two power parameters, and i an index from 1 to n, where n is the number of requested colors. The HSV colors are then generated according to the following formulas. Qualitative: H = h1 + (h2 - h1) * (i - 1) / (n - 1) S = s1 V = v1 Sequential: H = h2 - (h2 - h1) * j S = s2 - (s2 - s1) * j^p1 V = v2 - (v2 - v1) * j^p2 with j = (n - i) / (n - 1) Diverging: H = cond(j > 0, h1, h2) S = s1 * abs(j)^p1 V = v2 - (v2 - v1) * abs(j)^p2 with j = (n - 2*j + 1) / (n - 1) Syntax: hsv [, scheme hue(h1 [h2]) saturation(s1 [s2]) value(v1 [v2]) power(p1 [p2]) palette_options ] Options: scheme picks the type of color formula (qualitative, sequential, or diverging) and sets the default parameter values. scheme can be one of following (qualitative is the default). Qualitative (view) h1 h2 s1 v1 qualitative 15 h1+360*(n-1)/n .4 .85 intense 15 h1+360*(n-1)/n .6 .9 dark 15 h1+360*(n-1)/n .6 .7 light 15 h1+360*(n-1)/n .3 .9 pastel 15 h1+360*(n-1)/n .2 .9 rainbow 15 h1+360*(n-1)/n 1 1 Sequential (view) h1 h2 s1 s2 v1 v2 p1 p2 sequential 240 h1 .8 .05 .6 1 1.2 p1 blues 240 h1 .8 .05 .6 1 1.2 p1 greens 140 120 1 .1 .3 1 1.2 p1 grays 0 h1 0 0 .1 .95 1.0 p1 oranges 30 h1 1 .1 .9 1 1.2 p1 purples 270 h1 1 .1 .6 1 1.2 p1 reds 0 20 1 .1 .6 1 1.2 p1 heat 0 60 1 .2 1 1 0.3 p1 terrain 120 0 1 0 .65 .95 0.7 1.5 Diverging (view) h1 h2 s1 v1 v2 p1 p2 diverging 240 0 .8 .6 .95 1.2 p1 bluered 240 0 .8 .6 .95 1.2 p1 bluered2 240 0 .6 .8 .95 1.2 p1 bluered3 175 320 .6 .8 .95 1.2 p1 greenorange 130 40 1 .8 .95 1.2 p1 browngreen 40 150 .8 .6 .95 1.2 p1 pinkgreen 330 120 .9 .6 .95 1.2 p1 purplegreen 290 120 .7 .5 .95 1.2 p1 hue(h1 [h2]) overwrites the default values for h1 and h2. h1 and h2 are hues on the 360 degree color wheel. saturation(s1 [s2]) sets overwrites the default values for s1 and s2, with s# in [0, 1]. s1 and s2 determine the colorfulness (color intensity). value(v1 [v2]) overwrites the default values for v1 and v2, with v# in [0, 1]. l1 and l2 determine the brightness (amount of gray). power(p1 [p2]) overwrites the default values for p1 and p2, with p# > 0. p1 and p2 determine the shape of the transition between saturation and value levels. For linear transitions, set p#=1; p#>1 makes the transition faster, p#<1 makes the transition slower. +-------------+ ----+ ColorBrewer +-------------------------------------------------------------- ColorBrewer is a set of color schemes developed by Brewer et al. (2003; also see Brewer 2016). The colors are licensed under Apache License Version 2.0; see the copyright notes at ColorBrewer_updates.html. For more information on ColorBrewer also see http://colorbrewer2.org/. The RGB values for the implementation of the colors in colorpalette9 have been taken from the Excel spreadsheet provided at ColorBrewer_RGB.html. The CMYK values have been taken from file cb.csv provided at GitHub. ColorBrewer palettes for Stata are also provided by Gomez (2015) and by Buchanan (2015). The syntax for the ColorBrewer palettes is scheme [, cmyk palette_options ] where scheme is one of the following Qualitative (view) Accent 8 accented colors for qualitative data Dark2 8 dark colors for qualitative data Paired 12 paired colors for qualitative data Pastel1 9 pastel colors for qualitative data Pastel2 8 pastel colors for qualitative data Set1 9 colors for qualitative data Set2 8 colors for qualitative data Set3 12 colors for qualitative data Sequential (single hue) (view) Blues light blue to blue (3-9 colors) Greens light green to green (3-9 colors) Greys light gray to gray (3-9 colors) Oranges light orange to orange (3-9 colors) Purples light purple to purple (3-9 colors) Reds light red to red (3-9 colors) Sequential (multi-hue) (view) BuGn light blue to green (3-9 colors) BuPu light blue to purple (3-9 colors) GnBu light green to blue (3-9 colors) OrRd light orange to red (3-9 colors) PuBu light purple to blue (3-9 colors) PuBuGn light purple over blue to green (3-9 colors) PuRd light purple to red (3-9 colors) RdPu light red to purple (3-9 colors) YlGn light yellow to green (3-9 colors) YlGnBu light yellow over green to blue (3-9 colors) YlOrBr light yellow over orange to brown (3-9 colors) YlOrRd light yellow over orange to red (3-9 colors) Diverging (view) BrBG brown to green, light gray mid (3-11 colors) PiYG pink to green, light gray mid (3-11 colors) PRGn purple to green, light gray mid (3-11 colors) PuOr purple to orange, light gray mid (3-11 colors) RdBu red to blue, light gray mid (3-11 colors) RdGy red to gray, white mid (3-11 colors) RdYlBu red to blue, yellow mid (3-11 colors) RdYlGn red to green, yellow mid (3-11 colors) Spectral red - orange - yellow - green - blue (3-11 colors) and option cmyk requests the CMYK variant of the scheme. The default is to use the RGB variant. +------+ ----+ ptol +--------------------------------------------------------------------- The ptol collection provides color schemes suggested by Tol (2012). The syntax is ptol [, scheme palette_options ] where scheme is one of the following (view). qualitative 1-12 qualitative colors; the default diverging 3-11 diverging colors; very similar to reverse RdYlBu rainbow 4-12 rainbow colors +----+ ----+ d3 +----------------------------------------------------------------------- The d3 collection provides color schemes from D3.js, using the color values found at github.com/d3. The syntax is d3 [, scheme palette_options ] where scheme is one of the following (view). 10 10 categorical colors; the default; same as first 10 colors in tableau 20 20 categorical colors in pairs; same colors as in tableau, but ordered differently 20b 20 categorical colors in groups of four 20c 20 categorical colors in groups of four +-----+ ----+ lin +---------------------------------------------------------------------- The lin collection provides semantic color schemes suggested by Lin et al. (2013). The values of the semantic colors have been taken from the source code of the brewscheme package by Buchanan (2015) (brewextra.ado, version 1.0.0, 21 March 2016); the values of the tableau palette have been taken from code provided by the authors at GitHub. The syntax is lin [, scheme algorithm palette_options ] where scheme is one of the following tableau 20 categorical colors; the default carcolor 6 car colors food 7 food colors features 5 feature colors activities 5 activity colors fruits 7 fruit colors vegetables 7 vegetable colors drinks 7 drinks colors brands 7 brands colors and option algorithm requests algorithm selected colors. The default is to return the colors selected by Turkers (in case of carcolor, food, features, activities) or by the expert (in case of fruits, vegetables, drinks, brands). algorithm has no effect for tableau. +-------+ ----+ spmap +-------------------------------------------------------------------- The spmap collection provides color schemes from the spmap package by Pisati (2007). The implementation is based on code from spmap_color.ado (version 1.3.0, 13 March 2017). The syntax is spmap [, scheme palette_options ] where scheme is one of the following (view). blues light blue to blue (2-99 colors); the default greens light green to green (2-99 colors) greys light gray to black (2-99 colors) reds light red to red (2-99 colors) rainbow 2-99 rainbow colors heat 2-16 heat colors terrain 2-16 terrain colors topological 2-16 topological colors +------+ ----+ sfso +--------------------------------------------------------------------- The sfso collection provides color schemes by the Swiss Federal Statistical Office (using hex and CMYK codes found in Bundesamt für Statistik 2017). The syntax is sfso [, scheme cmyk palette_options ] where scheme is one of the following Sequential (view) brown dark brown to light brown (6 colors) orange dark orange to light orange (6 colors) red dark red to light red (6 colors) pink dark pink to light pink (6 colors) purple dark purple to light purple (6 colors) violet dark violet to light violet (6 colors) blue dark blue to light blue (7 colors); the default ltblue lighter version of blue (6 colors) turquoise dark turquoise to light turquoise (6 colors) green dark green to light green (6 colors) olive dark olive to light olive (6 colors) black dark gray to light gray (6 colors) Semantic (view) parties colors used by the SFSO for Swiss parties (11 colors) languages colors used by the SFSO for languages (5 colors) votes colors used by the SFSO for results from votes (10 colors) and option cmyk requests the CMYK variant of the scheme. The default is to use the RGB variant. +-----------+ ----+ colorlist +---------------------------------------------------------------- Instead of using a named color palette you can provide a custom palette by specifying a list of colorstyles (named colors, RBG colors specified as "# # #", CMYK colors specified as "# # # #", or HSV colors specified as "hsv # # #"). Example (navy in 4 different ways): . colorpalette9 navy "26 71 111" "85 40 0 144" "hsv 209 .766 .435" It is also possible to specify RGB colors using their 6-digit hex codes (or 3-digit abbreviations; see en.wikipedia.org/wiki/Web_colors for background information; some websites providing collections of colors are www.w3schools.com/colors, htmlcolorcodes.com, or www.color-hex.com). Start the color specification with a hash in this case. The hex codes will be translated to RGB. Example: . colorpalette9 #30C #3300cc #FFC0CB #ffc0cb Furthermore, HCL colors can be provided as "hcl # # #", where the first number specifies the hue (dominant wavelength in degrees of the 360 degree color wheel), the second number specifies the chroma (colorfulness, color intensity; # >= 0) and the third number specifies the luminance (brightness, amount of gray; # in [0, 100]). HCL colors will be translated to RGB. Example: . colorpalette9 "hcl 0 100 70" "hcl 120 100 70" "hcl 240 100 70" Color intensity adjustment may be requested by adding adjustment factor *# to a color. Example (original navy and navy with 70% intensity in 3 different ways): . colorpalette9 navy navy*.7 "26 71 111*.7" #1a476f*.7 Furthermore, since Stata 15, colors may be complemented by opacity specified as %#. Example (original navy and navy with 80% opacity in 3 different ways): . colorpalette9 navy navy%80 "26 71 111%80" #1a476f%80 Intensity and opacity can be combined: . colorpalette9 navy navy*.7 navy%80 navy*.7%80 +--------+ ----+ myname +------------------------------------------------------------------- A personal named palette can be provided in form of a program called colorpalette9_myname, where myname is the name of the palette. Palette myname will then be available to colorpalette9 like any other palette. Your program should return the color definitions as a comma-separated list in local macro P. In addition you may provide a comma-separated list of descriptions in local macro I. For example, the following program provides a palette called bootstrap3 containing the semantic colors used for buttons in Bootstrap v3.3: program colorpalette9_bootstrap3 c_local P #ffffff,#337ab7,#5cb85c,#5bc0de,#f0ad4e,#d9534f, /// #e6e6e6,#286090,#449d44,#31b0d5,#ec971f,#c9302c c_local I default,primary,success,info,warning,danger,default.focus, /// primary.focus,success.focus,info.focus,warning.focus,danger.focus end After defining the program, you can, for example, type . colorpalette9 bootstrap3, rows(6) to view the palette. More complicated definitions of palettes that take account of options are also possible. See the palette definitions colorpalette9.ado for examples. Example Apart from viewing color palettes, colorpalette9 is useful for retrieving colors that can then be passed through to a graph command. Here is an example of a contour plot using the terrain scheme from the hcl palette: . sysuse sandstone, clear . colorpalette9 hcl, terrain n(10) nograph . twoway contour depth northing easting, levels(`r(n)') ccolors(`r(p)') Saved results colorpalette9 stores the following in r() (Syntax 1 only): Scalars r(n) number of returned colors Macros r(ptype) color r(pname) name of palette or custom r(pnote) additional information on palette (if provided) r(p) space separated list of colors r(p#) #th color r(p#info) info of #th color (if provided) References Bischof, D. 2017a. G538SCHEMES: module to provide graphics schemes for http://fivethirtyeight.com. Available from http://ideas.repec.org/c/boc/bocode/s458404.html. Bischof, D. 2017b. New graphic schemes for Stata: plotplain and plottig. The Stata Journal 17(3): 748–759. Briatte, F. 2013. SCHEME-BURD: Stata module to provide a ColorBrewer-inspired graphics scheme with qualitative and blue-to-red diverging colors. Available from http://ideas.repec.org/c/boc/bocode/s457623.html. Brewer, C. A., G. W. Hatchard, M. A. Harrower. 2003. ColorBrewer in Print: A Catalog of Color Schemes for Maps. Cartography and Geographic Information Science 30(1): 5–32. Brewer, C. A. 2016. Designing Better Maps. A Guide for GIS Users. 2nd ed. Redlands, CA: Esri Press. Buchanan, B. 2015. BREWSCHEME: Stata module for generating customized graph scheme files. Available from http://ideas.repec.org/c/boc/bocode/s458050.html. Bundesamt für Statistik 2017. Layoutrichtlinien. Gestaltungs und Redaktionsrichtlinien für Publikationen, Tabellen und grafische Assets. Version 1.1.1. Neuchâtel. Gomez, M. 2015. Stata command to generate color schemes. Available from http://github.com/matthieugomez/stata-colorscheme. Ihaka, R., P. Murrell, K. Hornik, J. C. Fisher, R. Stauffer, A. Zeileis. 2016. colorspace: Color Space Manipulation. R package version 1.3-2. Available from http://CRAN.R-project.org/package=colorspace. Juul, S. 2003. Lean mainstream schemes for Stata 8 graphics. The Stata Journal 3(3): 295-301. Lin, S., J. Fortuna, C. Kulkarni, M. Stone, J. Heer. 2013. Selecting Semantically-Resonant Colors for Data Visualization. Computer Graphics Forum 32(3pt4): 401-410. Morris, T. 2013. SCHEME-MRC: Stata module to provide graphics scheme for UK Medical Research Council. Available from http://ideas.repec.org/c/boc/bocode/s457703.html. Morris, T. 2015. SCHEME-TFL: Stata module to provide graph scheme, based on Transport for London's corporate colour pallette. Available from http://ideas.repec.org/c/boc/bocode/s458103.html. Okabe, M., K. Ito. 2002. Color Universal Design (CUD). How to make figures and presentations that are friendly to Colorblind people. Available from http://jfly.iam.u-tokyo.ac.jp/color/. Pisati, M. 2007. SPMAP: Stata module to visualize spatial data. Available from http://ideas.repec.org/c/boc/bocode/s456812.html. Tol, P. 2012. Colour Schemes. SRON Technical Note, Doc. no. SRON/EPS/TN/09-002. Available from https://personal.sron.nl/~pault/colourschemes.pdf. Zeileis, A., K. Hornik, P. Murrell. 2009. Escaping RGBland: Selecting Colors for Statistical Graphics. Computational Statistics & Data Analysis 53: 3259-3270. Author Ben Jann, University of Bern, ben.jann@soz.unibe.ch Thanks for citing this software as Jann, B. (2018). Color palettes for Stata graphics. The Stata Journal 18(4): 765-785. or Jann, B. (2017). palettes: Stata module providing color palettes, symbol palettes, and line pattern palettes. Available from http://ideas.repec.org/c/boc/bocode/s458444.html. Also see Online: help for colorpalette, symbolpalette, linepalette, grstyle set, graph, colorstyle