Metadata-Version: 2.4
Name: hadalized
Version: 0.6.0
Summary: Hadalized color theme builder.
Keywords: colorscheme,colortheme,oklch
Author: Shawn O'Hare
Author-email: Shawn O'Hare <shawn@shawnohare.com>
License-Expression: MIT-0
License-File: LICENSE
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Dist: coloraide>=6.2
Requires-Dist: cyclopts>=4.5.0
Requires-Dist: jinja2>=3.1.6
Requires-Dist: loguru>=0.7.3
Requires-Dist: luadata>=1.0.5
Requires-Dist: pydantic>=2.12.5
Requires-Dist: pydantic-settings>=2.12.0
Requires-Dist: tomli-w>=1.2.0
Requires-Dist: xdg-base-dirs>=6.0.2
Requires-Python: >=3.14
Project-URL: Repository, https://github.com/hadalized/hadalized
Project-URL: Changelog, https://github.com/hadalized/hadalized/blob/main/CHANGELOG.md
Project-URL: Releases, https://github.com/hadalized/hadalized/releases
Description-Content-Type: text/markdown

# hadalized color theme build

Python package with CLI to build hadalized-style application themes.

## Introduction

The application can build any theme conforming to the hadalized `Palette`
schema for any application with a `BuildConfig` and appropriate theme
template.

The builtin [hadalized color palettes](./src/hadalized/colors.py)
are defined as oklch color values. Application theme templates are rendered
with the appropriate color type (e.g., hex values for neovim). Under the hood
the `coloraide` python package is used to transform between colorspaces and fit
to gamuts.

Creating a theme builder arises from the desire to use the OKLCH color space
as the basis for any application color theme. When developing the palette, it
quickly becomes tedius to manually convert oklch values to their hex
equivalents.

The builder primarily targets the neovim colorscheme files in
[hadalized.nvim](https://github.com/hadalized/hadalized.nvim), as that is
the editor we primarily use.

## Installation

We recommend installing the cli application via `uv`

```sh
uv tool install hadalized
```

## Example CLI Usage

Assuming `uv` is installed,

```sh
uv run --exact hadalized build --out="build"
```
will produce rendered theme files for all builtin applications in `./build`.

If the tool is installed via `uv tool install` or if the virtualenv is activated

```sh
# To build neovim color themes
uv build neovim --out=colors  # -> colors/hadalized*.lua
# To build all color themes, with outputs to `./build`
uv build
```

## Development

Assuming `uv` and `just` are installed

```sh
uv sync --locked
source .venv/bin/activate
# make changes
just fmt
just check
just test
# commit changes
```

## Roadmap / TODOs

- [ ] Consider removing the "in-memory" cache functionality.
- [ ] (A) Add ability to map named colors such as `red` to an abstracted name
  such as `color1`, similar to `base16`. Use these abstracted names color theme
  templates. This might be painful to work with in practice, as one has to keep
  the mapping in their head.
- [ ] (B) As an extension of (A), consider lightweight pandoc inspired features
  where an intermediate and generic theme can be defined and referenced in
  editor templates. For example, allow a user to define `integer = "blue"` and
  reference `theme.integer` to color neovim `Integer` highlight groups.
