colornamer 1.0.1

give me a color and I will name it
Documentation
  • Coverage
  • 63.33%
    19 out of 30 items documented0 out of 23 items with examples
  • Size
  • Source code size: 148.33 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • acrisci

colornamer-rs

Give me a color and I will name it.

colornamer-rs is in the early stages of development and the api should be considered unstable

About

Naming things is one of the hard things in computer science.

Colornamer-rs is a library written in Rust that helps you come up with a good name for a color.

It does this by converting the color to Lab color space and using the Delta E formula to compare the color difference in a list of colors with known names and finding the nearest neighbor.

Example

extern crate colornamer;

use colornamer::{ColorNamer, Colors};

fn main() {
    let colornamer = ColorNamer::new(Colors::HTML);
    let name: String = colornamer.name_hex_color("#1E90FF").unwrap()

    println!("I will call this color '{}'", name);
}

Lists

The color names are derived from several lists:

Acknowledgements

This library is based on the wonderful color-namer library for nodejs.

Color difference formulas were found at easyrgb.com.

Further reading:

License

MIT (see LICENSE)