color_parser_lib 0.1.0

A simple hex color parser that supports shorthand and alpha channels
Documentation
  • Coverage
  • 0%
    0 out of 10 items documented0 out of 3 items with examples
  • Size
  • Source code size: 6.15 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 489.37 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Mr-Unforgettable/color_parser
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Mr-Unforgettable

Color Parser

A simple and lightweight Rust library to parse hex color codes.

Supports:

  • 3-digit shorthand (#FA3)
  • 4-digit shorthand with alpha (#FA3C)
  • Full hex (#FFAABB)
  • Full hex with alpha (#FFAABBCC)

Usage

use color_parser::parse_hex_color;

let color = parse_hex_color("#FFAABB").unwrap();
println!("{:?}", color); // Rgba { red: 255, green: 170, blue: 187, alpha: 255 }

Features

  • Support for RGBA values
  • Support for shorthand syntax
  • Support for HSV and HSL value parsing (In Development)