thank you for you reply.
i think it can be done perhaps easier (i thought of this last night)
inside the weatherscript i already define te RGB values used for the weathersituation (temperature, rain, windspeed etc...)
so all i need :-)
would be a way to generate a legend based on already know possible RBG-values
example of the lines inside the script of the weatherprogram: http://www.usawx.com/digitatmosexamples.htm
the format (color depth, size, png or jpg) can be set as you wish
would that make some difference ?