Iro generates Base24 color schemes from images using the OKLAB perceptually-uniform color space.
You can use Iro as a web application:
or as a CLI tool:
Usage: iro-cli [OPTIONS] <PATH>
Arguments:
<PATH> Path to the image
Options:
-l, --light Generates light color schemes when true
-k, --keep <KEEP> The number of colors to keep from the image [default: 8]
-r, --rotation <ROTATION> How many positions to rotate the highlight colors [default: 0]
-s, --segment-size <SEGMENT_SIZE> The size (in degrees) of a color wheel segment that should be treated as a single hue [default: 15]
-b, --base-chroma <BASE_CHROMA> The chroma to use for base colors
-h, --hl-lightness <HL_LIGHTNESS> The lightness to use for highlight colors
-h, --hl-chroma <HL_CHROMA> The chroma to use for highlight colors
-h, --help Print help
-V, --version Print version
To try out Iro temporarily:
nix shell 'github:LoganWalls/iro'
To use Iro in a flake:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
iro = {
url = "github:LoganWalls/iro";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {nixpkgs, ...}@inputs: let
inherit (nixpkgs) lib;
withSystem = f:
lib.fold lib.recursiveUpdate {}
(map f ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]);
in
withSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
iro = inputs.iro.packages.${system}.default;
in
with pkgs; {
devShells.${system}.default = mkShell {packages = [ iro ];};
}
);
};
- Install the rust toolchain
- Clone this repository
- Enter the cloned repository
- Run
cargo build --release
- Add the binary at
./target/release/iro
to your$PATH
- Choose an image that you want to use as the basis for your color scheme
- Run Iro from the CLI or Web App using that image
- (Optional) Customize your theme using Iro's options (exposed as sliders in the Web App or options in the CLI)
The steps above will produce a color scheme in YAML format that complies with the Base24 spec (if using the Web App you can copy the YAML to your clipboard using the icon at the top left of the interface). To use the color scheme in your programs, run it through a Base24 builder such as Flavours or base-24-builder-python to generate Base16/24 color schemes for any supported program.
A huge thank you to everyone who answered my questions and helped me learn along the way while working on this project!
An extra special thank you to the following people:
The image used in the screenshot above was created by daisukerichard.