Function toRgb

Parses colour to { r, g, b } where each field is on 0..1 scale. opacity field is added if opacity is not 1. Named colours