This leaves me with three integer values, which I would like to calculate to end up with one CSS Hex value. Is that possible or do I need to approach this problem differently?
The doc says it returns a Real Number between 0 and 1. Which might make sense because different monitors/video cards have different maximum values for a white pixel. Some have 256, and some have 1024, I believe. So my guess is that to get the Real Number down to an integer you may have to multiple it and Round the result.
But that's only half the problem. You also have to convert it to a CSS Hex value. I've never seen a CSS Hex so I'm not sure what it looks like, but I'm guessing you can create it by using this feature of KM. Look at the very bottom of Peter's post here:
I suspect that's the second thing you will have to do.
If these hints don't help, please reply. I guess I was too lazy to look up CSS Hex and write the code for you.