-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rounding of value and chroma when using munsell2rgb #44
Comments
Correct. All good points: the manual should make it more clear and offer a solution for non-standard Munsell notation, such as For example: library(aqp)
# troublesome color, probably generated via conversion from other color space
m <- '8.9YR 3.69/5.4'
# parse into pieces, don't attempt conversion
(mp <- parseMunsell(m, convertColors = FALSE))
# conversion doesn't work because it is performed via LUT
aqp::munsell2rgb(mp$hue, mp$value, mp$chroma)
# you can find the closest Munsell "chip" in the LUT
getClosestMunsellChip(m, convertColors = FALSE)
# convert the closest "chip" into sRGB
getClosestMunsellChip(m, convertColors = TRUE, return_triplets=TRUE) |
Another idea, perhaps for aqp 2.0: make Also, see #10 for the original issue on non-standard Munsell notation. |
Right, I've whipped up a naive patch:
See b1fdc73 But maybe invoking |
This works for now. For next time:
|
For some reason b1fdc73 didn't make it into the code. I've added a slightly modified version and related tests. |
At the moment,
munsell2rgb
requiresthe_value
andthe_chroma
to be integers, otherwise aNA
is returned:I think this should be made clear(er) to users. Different options:
munsell2rgb
to automatically convertthe_value
andthe_chroma
to integers, with a warningmunsell2rgb
to throw an error ifthe_value
and/orthe_chroma
are not integersThe text was updated successfully, but these errors were encountered: