A transform stream for glslify
that replaces CSS-style hexadecimal colors with
Once you've enabled the stream, you simply put your hex colors in your file like so:
The above color will be (naïvely) replaced with a GLSL
vec3 definition, i.e.:
You can also use 8-digit hexadecimals for
vec4 definitions. The above
example could also be expressed like so:
To use glslify transform streams, you currently need to use
var createStream =var stream =stream
This might have changed by the time you read this though, so be sure to double check the glslify documentation!
MIT. See LICENSE.md for details.