mnsl {munsell}R Documentation

Converts a Munsell colour to hex

Description

Take a character string representation of a Munsell colour and returns the hex specification of that colour

Usage

  mnsl(col, ...)

Arguments

col

a character string representing a Munsell colour.

...

passed on to check_mnsl. Use fix = TRUE to fix "bad" colours

Details

Munsell colours are specified by hue, value and chroma. They take a form like "5PB 5/10" where the first characters represent the hue, followed by a space then the value and chroma separated by a "/". In this package value should be an integer in 0:10 and chroma an even number at most 24. Note that not all possible specifications result in representable colours.

Value

a character string specification of a hex colour

See Also

check_mnsl, hvc2mnsl

Examples

mnsl2hex("5PB 5/10")
# use a munsell colour in a plot
require("ggplot2")
ggplot(data.frame(x = 1:10)) + geom_point(aes(x = x, y = x),
  colour = mnsl2hex("5PB 5/10"))

[Package munsell version 0.4.2 Index]