https://github.com/finefindus/adobe-swatch-exchange-rs
A small, dependencies-free Rust library for writing and reading from .ase (Adobe Swatch Exchange) files.
https://github.com/finefindus/adobe-swatch-exchange-rs
adobe-swatch-exchange ase library palette rust rust-lang
Last synced: about 2 months ago
JSON representation
A small, dependencies-free Rust library for writing and reading from .ase (Adobe Swatch Exchange) files.
- Host: GitHub
- URL: https://github.com/finefindus/adobe-swatch-exchange-rs
- Owner: FineFindus
- License: mpl-2.0
- Created: 2023-10-03T14:21:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-26T15:38:46.000Z (3 months ago)
- Last Synced: 2025-03-06T04:17:33.845Z (about 2 months ago)
- Topics: adobe-swatch-exchange, ase, library, palette, rust, rust-lang
- Language: Rust
- Homepage: https://crates.io/crates/adobe-swatch-exchange
- Size: 89.8 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Adobe Swatch Exchange
A small, dependencies-free Rust library for writing and reading from `.ase` files.ASE has the option to either store single colors or colors in a named group. Each color consists of a name, the actual color data (in RGB, CMYK, LAB or Gray format), and a color type, which indicates how the color behaves in the document.
## Usage
```rust
use adobe_swatch_exchange::{ColorBlock, ColorType, ColorValue};let color = ColorBlock::new(
"#BF616A".to_owned(),
ColorValue::Rgb(0.749_019_6, 0.380_392_16, 0.415_686_28),
ColorType::Normal);// write colors as ASE
let ase = adobe_swatch_exchange::create_ase(vec![], vec![color]);// read colors from ASE
let (groups, colors) = adobe_swatch_exchange::read_ase(&*ase).unwrap();
```## License
This Project is licensed under [MPL-2.0](https://opensource.org/license/mpl-2-0/). It has no affiliation with Adobe Inc.