[How To] Colors API
precalculated RGB values: thanks you so much Cliff
precalculated RGB values: thanks you so much Cliff
I definitelly seccond this thanks!
Yep, converting this new algorithm to PHP was not too hard, also using arrays for vectors and some algebra functions. Thanks for the precalculated values, too.
=)
Yep, converting this new algorithm to PHP was not too hard, also using arrays for vectors and some algebra functions. Thanks for the precalculated values, too.
=)
Mind to share? I’m still getting incorrect values with this:
https://gist.github.com/codemasher/b869faa7603e1934c28d
(my brain melts >.<)
Smiley, I think you just need to change your bgrVector (line 82) from a single-row matrix to a single-column matrix. Then swap the order in the matrix multiplication, so it matches Cliff’s order.
Ah, thanks Dr Ishmael, that helped!
Updated and cleaned up that gist, you may take it as php example then:
https://gist.github.com/codemasher/b869faa7603e1934c28d
Also updated my color list: https://chillerlan.net/gw2color.php
Anyway, theres still the other conversion approach - i’d still like to know where the flaw is in there…
(edited by smiley.1438)
Sorry, I somehow thought I posted the Gist link here. Since it’s already done now and looks pretty much exactly like mine, I won’t bother posting an identical copy, so people can focus a little more on what’s working.
What about the difference between highlight, base, and shadow of each dye? The Flame & Frost dyes obviously have a greater difference in these values than most dyes do. How is this determined?