Change RGB/Hex conversions to not use eval.

When using the library in an environment with strict Content Security Policy configuration calls to "eval()" are forbidden. This patch eliminates two of the existing calls to ensure custom coloring can be used in such configurations.