Packages / rupm

rs-graphics-color 0.1.0

Convert hex, RGB, HSL and HSV colors, blend them and compute contrast ratio

Install

cargo add rs-graphics-color --registry rupm

In Ruststudio: Packages, search for rs-graphics-color, Install.

Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-23.

Versions

README

# rs-graphics-color

Convert hex, RGB, HSL and HSV colors, blend them and compute contrast ratio

Add it with `rupm add rs-graphics-color` (or `cargo add rs-graphics-color --registry rupm`).

```rust
let c = rs_graphics_color::Rgb::from_hex("#ff8800")?;
let ratio = rs_graphics_color::contrast_ratio(c, rs_graphics_color::Rgb::new(0, 0, 0));
let hsl = c.to_hsl();
```