https://github.com/ozwaldorf/oklabby
Simple cli tool for oklab color manipulation
https://github.com/ozwaldorf/oklabby
cli color oklab rust
Last synced: 10 months ago
JSON representation
Simple cli tool for oklab color manipulation
- Host: GitHub
- URL: https://github.com/ozwaldorf/oklabby
- Owner: ozwaldorf
- Created: 2024-04-03T22:03:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T20:25:53.000Z (about 2 years ago)
- Last Synced: 2025-04-10T17:00:43.050Z (about 1 year ago)
- Topics: cli, color, oklab, rust
- Language: Rust
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Oklabby
Simple cli tool for oklab color manipulation
## Usage
### Install from source
```bash
git clone https://github.com/ozwaldorf/oklabby
cargo install --path .
```
### Nix
A nix flake is available and can be run easily with:
```bash
nix run github:ozwaldorf/oklabby
```
Cache is provided via https://garnix.io
### Examples
#### Show different encodings of colors
```bash
oklabby show 000 fff
```
#### Average N colors

```bash
# rgb hex codes
oklabby average 000 ffffff ...
# or use oklab floats directly
oklabby average "[0.0, 0.5, 1.0]" "[0,0,0]" ...
```
#### Quantize N steps between colors (inclusive)

```bash
oklabby quantize -s16 fff "[0,0,0]"
```
#### Generate shades using quantize

```bash
oklabby quantize -s9 000 00f fff
```