Assign a style dynamic

The webapp I’m developing uses a preference file for various settings.
One of the thing I would like to achieve is to store the wanted styles in the preference file.
Afaik it is not possible to store the WebStyle like, for example, a color, where I can use &c followed by the wanted color.
(&s for string a style would be very useful ;))
Storing the WebStyle as a string in the preference file is possible, but assigning that string as a stye to a control style isn’t working.
Style.name would be nice to use, but name is readonly.
Who knows a way on how to store a style in the preference file so it can be assigned to control style easily?