I'm looking for a clear description of what equations need to be applied, but haven't had any luck with Google and Wikipedia. Anyone know of a good source for this? Thanks.

This is a discussion on *Conversion to and from the Munsell color model* within the **C++ Programming** forums, part of the General Programming Boards category; I'm looking for a clear description of what equations need to be applied, but haven't had any luck with Google ...

- 01-21-2009 #1
## Conversion to and from the Munsell color model

I'm looking for a clear description of what equations need to be applied, but haven't had any luck with Google and Wikipedia. Anyone know of a good source for this? Thanks.

Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }

- 01-21-2009 #2

- Join Date
- Mar 2008
- Location
- RTP
- Posts
- 839

it looks like it's essentially HSL done with subtractive RYB color instead of additive RGB

there's a javascript RYB to RGB converter in the source of this page:

http://www.paintassistant.com/rybrgb.html

wiki has formulae for converting to and from HSL/RGB

http://en.wikipedia.org/wiki/HSL_color_space

- 01-21-2009 #3
Well, just keep in mind that the model isn't entirely mathematical; rather, it's based on observed perceptions of color, and so it requires complex calculations that generally require actual tables of data, which are typically fed into matrices to calculate the conversion. But thanks for the links, I will look into it.

Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }

- Exactly how to get started with C++ (or C) today
- C Tutorial
- C++ Tutorial
- 5 ways you can learn to program faster
- The 5 Most Common Problems New Programmers Face
- How to set up a compiler
- 8 Common programming Mistakes
- What is C++11?
- Creating a game, from start to finish

- How to create a shared library on Linux with GCC - December 30, 2011
- Enum classes and nullptr in C++11 - November 27, 2011
- Learn about The Hash Table - November 20, 2011
- Rvalue References and Move Semantics in C++11 - November 13, 2011
- C and C++ for Java Programmers - November 5, 2011
- A Gentle Introduction to C++ IO Streams - October 10, 2011