Skip to content
/ iro Public

🎨 Generate aesthetic & customizable color schemes from your favorite images.

License

Notifications You must be signed in to change notification settings

LoganWalls/iro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iro

Iro generates Base24 color schemes from images using the OKLAB perceptually-uniform color space.

You can use Iro as a web application: Web App screenshot

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

Install

Nix

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 ];};
        }
    );
};

From source

  1. Install the rust toolchain
  2. Clone this repository
  3. Enter the cloned repository
  4. Run cargo build --release
  5. Add the binary at ./target/release/iro to your $PATH

Usage

  1. Choose an image that you want to use as the basis for your color scheme
  2. Run Iro from the CLI or Web App using that image
  3. (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.

Acknowledgements

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.

About

🎨 Generate aesthetic & customizable color schemes from your favorite images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published