Well the hue is working properly now. The problem was quite simple to fix, but it was an understandable mistake. This was a situation where giving up and walking away was the best thing to do. After working on it for quite a while, it was only minutes of stopping that the solution popped into my head. It’s not that I was doing it wrong, but rather that there are two approaches to the same thing, and that is where the problem occurred.
This is what was going on. A matrix is a set of numbers, and we can do things with them, such as multiplication, to achieve different results.That is how all of these colour transformations are created. The problem is that there are to different ways that matrices are built depending on the environment. For example Flash does it differently then C++. Here is an example.
[ [ 1,1,1 1,0,0 0,0,0 1,0,0 0,0,0 1,0,0 ] ]
These two matrices are the same. But if you were to write it out one way and the environment was reading it another you get the wrong results. It’s like spelling a word with all the right letters but mixing up the order a little. Anyways, it was just a silly mistake, but really easy to fix once I realized what I was doing. Compare the Hue sliders in this version and the previous one to see the difference.