# get hue ordering for setting levels of a factor
huePosition(returnHues = TRUE)
# get hue ordering including N (neutral)
huePosition(returnHues = TRUE, includeNeutral = TRUE)
# get position of the '10YR' hue, relative to standard origin of '5R'
# should be 7
huePosition(x = '10YR')
# get position of the '10YR' hue, relative to standard origin of '5YR'
# should be 3
huePosition(x = '10YR', origin = '5YR')
# visualize
op <- par(mar = c(0, 0, 0, 0), fg = 'white', bg = 'black')
huePositionCircle(huePosition(returnHues = TRUE, origin = '5YR'))
par(op)
Run the code above in your browser using DataLab