You could literally copy the source code from the API docs for the current Color.value method. But how exactly are you going to use that in the long run? Why do you need to see a "value"?
Color.value