Current solution can't handle color definitons like rgb(255,255,0) which works well in all browsers
For example such a gradient gets rendered black which is fallback color.
Current code is only parsing hex values and known color names like "aliceblue". Extended parsing would be helpful.