-/*
- * Create a new color from a 32-bit RGBA value.
- */
-INLINE_MAYBE
-color_t color_from_rgba(rgba_t n)
-{
- colorchan_t r = (colorchan_t)UNPACK(n, 3) / S(255.0);
- colorchan_t g = (colorchan_t)UNPACK(n, 2) / S(255.0);
- colorchan_t b = (colorchan_t)UNPACK(n, 1) / S(255.0);
- colorchan_t a = (colorchan_t)UNPACK(n, 0) / S(255.0);
- return color_new(r, g, b, a);
-}
-