- Fixed
YELLOW
andYELLOW_CLEAR
to actually be Yellow instead of fuchsia colored. - Added builders to
EncodedColor
.
- BREAKING: changed the serialized name of
Encoded Rgb
toEncodedColor
. This will break serialization in formats likeJSON
orYAML
. - Added more color names like
YELLOW
,RED
, andTEAL
- Renamed
EncodedRgb
andLinearRgb
toEncodedColor
andLinearRgb
. This is simpler to understand for users and avoids ignoring thea
component. - Added the
rand
optional dependency
Added default implementations and hash implementation on EncodedRgb
No serious changes, but some performance improvements and additions for formatting and working with packed u32s.
- Conversions to and from packed u32s for
rgba
andbgra
. I supposedbgra
simply because I needed them in a project as well. - Hex conversions for
EncodedRgb
, which is just the hex for a packedrgba
struct. - Both of the above might not work well on a big-endian system. If someone knows more, I'd appreciate the advice.
- Conversion from
encoded_to_linear
is now done with a lookup table, rather than the actual math. This should be a nice speedup. - Made more functions
const
and#[inline]
for those gains.
Initial commit. See the README for project details.