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.
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; }
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
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; }