Crates.io | kolor-64 |
lib.rs | kolor-64 |
version | 0.1.9 |
source | src |
created_at | 2021-04-04 01:39:07.163518 |
updated_at | 2023-04-25 19:59:22.024422 |
description | Color conversions for games & interactive applications. |
homepage | |
repository | https://github.com/kabergstrom/kolor |
max_upload_size | |
id | 378577 |
size | 148,651 |
kolor is a crate for doing conversions between color spaces and helps with some other color math.
kolor is intended for use in games or other interactive visual applications, where it can help implement correct color management, wide color gamut rendering and tonemapping.
let conversion = kolor::ColorConversion::new(
kolor::spaces::SRGB,
kolor::spaces::ACES_CG,
);
let srgb_color = kolor::Vec3::new(0.25, 0.5, 0.75);
let aces_cg_color = conversion.convert(srgb_color);
kolor aims to supports all color spaces and color models which use 3-component vectors, such as RGB, LAB, XYZ, HSL, LMS and more.
In the spirit of keeping things simple, kolor uses a single type, ColorConversion, to represent a color conversion between any supported color spaces.
For more details on design and implementation, please have a look at the module docs.
kolor supports no_std
by disabling the default-enabled std
feature and enabling the libm
feature.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See LICENSE-APACHE and LICENSE-MIT.
Licensed under either of
at your option.
PLEASE NOTE that some dependencies may be licensed under other terms. These are listed in deny.toml under licenses.exceptions on a best-effort basis, and are validated in every CI run using cargo-deny.