Well that was easier than I thought. (cough)
I started off with copying the original code and started to create a custom function for my slider...
But after an hour or so something in my mind kept saying: THIS CAN BE DONE A WHOLE LOT EASYER !!!
Wel so far i have 2 options, the most elaborate option is to copy the
miLightPhotonColorReplace
and
miLightUpdatePhotonEnergy
procs and modify it to my slider.
But this gave me some update problems which are easily fixable. However I think this is way too much code for this simple operation.
So the easiest solution I have found so far is by directly modifying the colorSliderGrp in the AE editor and then force the update of the photon color. However there are two problems
1) the light has to be selected.
The problem is that if I force the selection the color is not updating as it should. I'm puzzled by how this goes wrong. Maybe maya does not update quickly enough for the procedure to work correctly.
A solution would be if i would be able to select the controller name based on the object but I am afraid that that is not possible. Something like this for example "spotLightShape2.lightPhotonColorCtrl".
2) problem two is somewhat trivial; the control only works one way.
If i change the photoncolor in the custom gui the photon color in the AE updates accordingly.
But if i do it the other way around the custom gui is not updated. I am afraid that I will not be able to work around this without adding a line of code in the original mel scripts. Which I absolutely do not want to do.
This is what I have at the moment which works if the correct light is selected.
if (`window -ex photonColorTest`){
deleteUI -window photonColorTest;
}
string $window = `window photonColorTest`;
columnLayout;
$lightObj = `spotLight`;
select -r $lightObj;
float $rgbValue[] = `colorSliderGrp -q -rgbValue lightPhotonColorCtrl`;
$phColorSlider = `colorSliderGrp -rgbValue $rgbValue[0] $rgbValue[1] $rgbValue[2] -cc "photonColUpdate($lightObj,$phColorSlider)" photonColorTest`;
showWindow $window;
global proc photonColUpdate(string $lightObj,string $controlName){
// get current color value
float $rgbColors[] = `colorSliderGrp -q -rgbValue $controlName`;
// change the color attributes of the selected light.
colorSliderGrp
-edit
-rgbValue $rgbColors[0] $rgbColors[1] $rgbColors[2]
lightPhotonColorCtrl;
miLightUpdatePhotonEnergy ($lightObj);
}
If i would add this piece of script to force the selection of the light when a change in the color slider occurs,
The update of the photon color does not seem to work anymore.
// at the start of the "photonColUpdate" procedure.
// get the current selection so we can restore it afterwards
$curSelObj = `ls -sl`; does not work
// select the light
select -r $lightObj;
// at the end of the procedure
// give user back original selection
select -r $curSelObj;
Do you have any idea how either
a) I would make sure that the light is correctly loaded
or
b) i can access the lightPhotonColorCtrl // nevermind this is definitly not possible without having the AE open 
or any other solution you can come up with. 
Thanks again for your time.
Jan