hdx_colors {gghdx} | R Documentation |
Hex values for HDX colors
Description
hdx_colors()
conveniently returns a vector of hex values for specified
color ramps. Full values can be found in hdx_color_list. If you
know the name of the color you want, such as "sapphire-hdx", you can use
hdx_hex(c("sapphire-hdx"))
to directly access the hex code.
Usage
hdx_colors(colors = c("sapphire", "mint", "tomato", "gray"))
hdx_colours(colors = c("sapphire", "mint", "tomato", "gray"))
hdx_hex(color_names)
hdx_color_names()
hdx_colour_names()
Arguments
colors |
Specified color ramps to return. Some set of "sapphire", "mint", "tomato", and "gray. By default returns all colors. |
color_names |
Vector of color names. Valid values are all available
using |
Details
All valid color names are in the named vector returned by hdx_colors()
or
accessible in the convenient hdx_color_names()
.
Value
-
hdx_colors()
returns a named vector of hex values. -
hdx_color_names()
returns a character vector of color names.
See Also
Other color hdx:
hdx_color_list
,
hdx_pal_discrete()
Examples
# get hex values
hdx_colors()
hdx_colors("sapphire")
# get color names
hdx_color_names()
[Package gghdx version 0.1.3 Index]