Skip to content

Releases: mazznoer/csscolorparser-rs

csscolorparser v0.8.2

01 Feb 06:58

Choose a tag to compare

  • Parse none value in absolute color format.
  • Changed impl Display for Color to hex color format.
  • Remove unnecessary allocations.

csscolorparser v0.8.1

28 Nov 04:18

Choose a tag to compare

Changed

  • Improvements in parser code.
  • improvements of calc() parser for relative color format.

Fixed

  • Require phf only if needed.

csscolorparser v0.8.0

08 Nov 03:47

Choose a tag to compare

Added

  • Support no_std. Thanks to @orhun

Changed

  • Support for parsing lab() format is always enabled now. Remove the lab cargo feature.
  • Using phf::OrderedMap and uncased::UncasedStr to store named colors.

csscolorparser v0.7.2

03 Jun 11:52

Choose a tag to compare

Added

  • Color::to_oklcha()
  • Color::to_css_hex()
  • Color::to_css_rgb()
  • Color::to_css_hsl()
  • Color::to_css_hwb()
  • Color::to_css_lab()
  • Color::to_css_lch()
  • Color::to_css_oklab()
  • Color::to_css_oklch()

Changed

  • Deprecate Color::to_hex_string() and Color::to_rgb_string().

Full Changelog: v0.7.1...v0.7.2

csscolorparser v0.7.1

16 May 02:14

Choose a tag to compare

What's Changed

  • avoid an allocation in the Deserialize impl for Color by @m4rch3n1ng in #20
  • docs: Add documentation to undocumented public APIs by @sorairolake in #25
  • Remove some unnecessary allocations on parser code by @mazznoer

New Contributors

Full Changelog: v0.7.0...v0.7.1

v0.7.0

05 Aug 14:18

Choose a tag to compare

Added

  • Color::from_oklcha()
  • Support parsing oklab() and oklch() color format.
  • Color::{from,to}_{laba,lcha}()

Changed

  • f64 -> f32
  • Return type for Color::to_{hsva,hsla,hwba,lab,lch,oklaba,linear_rgba}() changed from tuple to array.
  • Deprecate Color::{from,to}_{lab,lch}(), use Color::{from,to}_{laba,lcha}() instead.
  • NAMED_COLORS is now public

v0.6.2

22 Jul 11:48

Choose a tag to compare

  • Update dependencies.
  • Some improvements.

v0.6.1

14 Jul 15:03

Choose a tag to compare

  • New Color's methods: new, to_array, to_rgba8, to_rgba16, clamp, from_rgba8, from_linear_rgba8, name.
  • Deprecate some Color's methods.
  • Remove deprecated Color's methods: from_lrgb, from_lrgba, from_lrgb_u8, from_lrgba_u8, red, green, blue, alpha, to_lrgba, to_lrgba_u8, interpolate_lrgb.
  • More strict parser. rgb(255,100%,50%) is now invalid.
  • Update dependencies.
  • And some improvements.

v0.6.0

14 May 18:49

Choose a tag to compare

  • Added support for parsing lab and lch color format.

v0.5.0

12 Jun 15:04

Choose a tag to compare

  • Color: r, g, b, a fields are now public.
  • Color: Deprecate red(), green(), blue() and alpha().
  • Color: Rename some method functions to more descriptive names:
    • from_lrgba() -> from_linear_rgba()
    • interpolate_lrgb() -> interpolate_linear_rgb()
    • and some others.
  • phf are now optional dependency.
  • Rename ParseError -> ParseColorError.
  • Add support for serde, cint, rgb.