#rgb #color-space #pixel #hsv #color #graphics #luma

altered_perception

struct HSV/Luma/HSL/etc. for sharing pixels between crates + other pixel manipulations

6 releases (breaking)

0.5.0 Apr 7, 2023
0.4.0 Mar 15, 2023
0.3.2 Mar 15, 2023
0.2.0 Mar 14, 2023
0.1.0 Feb 12, 2023

#10 in #hsv

Download history 1/week @ 2024-09-17 15/week @ 2024-09-24

71 downloads per month

MIT license

22KB
385 lines

altered_perception

A rust library for converting and using various color spaces. It currently supports HSV, HSL, CMYK, CMY, and Luma pixels with conversion to and from RGB pixels.

This library is inspired by the rgb crate.

Changes

Various changes will be made since this is my first library. All methods/structs will stabilize by the v1.0.0 release, and the crate's structure is still being decided.

This should stabilize by May 2023.

Usage

Conversion between and use of various color spaces can be done using the following modules:

  • cmyk: Cyan-Magenta-Yellow-Black color space
  • cmy: Cyan-Magenta-Yellow color space
  • hsl: Hue-Saturation-Lightness color space
  • hsv: Hue-Saturation-Value color space
  • luma: Grayscale color space

Currently, only conversion between HSV & RGB, Luma & RGB, CMYK & RGB, CMY & RGB, and HSL & RGB is supported.

Additional Color Spaces

Support for more color spaces will be added as time goes on. Contributions are welcome.

MIT License

This create is licensed under an MIT license.

Dependencies

~230–445KB