Prism is a utility library for managing colors and colorspaces written in Zig.
Prism is lightweight, fast, and easy to use in general. There is no boilerplate, just import the library, and start using colors and convert them into any of supported colorspaces, including CIE l*a*b*, which is a highly useful colorspace for working with colors that our eyes actually percept.
Prism requires Zig version 0.13.0 to compile. First, fetch the library into your project using:
zig fetch --save https://github.com/nitrogenez/prism
This will fetch the latest commit from the master branch. Next, you should add the following to your build.zig:
const prism = b.dependency("prism", .{});
mystep.root_module.addImport("prism", prism.module("prism"));
Prism requires Zig version 0.13.0 to compile. To do so, simply run:
zig build
For more info see
zig build --help
All the files must be formatted and linted with zig fmt
. The code must be consistent and clean. If needed, use // zig fmt: off
and // zig fmt: on
comments.
If you are willing to make Prism better (or worse), you may follow the instructions:
- Fork Prism
- Create a new branch using git, e.g
git checkout -b feat/myfeat
- Write your dream code
- Add your changes and make a commit:
git add src/my_cool_change.zig
git commit -m "me code"
- Open a merge request
- Wait for any contributor to review your code
- Go get some tea, because the review may take a while
- Make changes if requested by a reviewer as described previousely
- You're GTG, enjoy your profile pic in a contributors list :)
NAME | STATE |
---|---|
CMYK | FULL |
HSI | FULL |
HSL | FULL |
LAB | FULL |
YIQ | FULL |
HSV | FULL |
RGB | FULL |
XYZ | FULL |
LUV | FULL |
- NAME - Name of the colorspace
- STATE - Colorspace support state
- FULL - A full-featured colorspace support (conversion to and from RGB or anything else)
- PARTIAL - It kinda works, but is lacking functionality (only data type / acknowledged)
- NO - No support at all
- TODO - Planned and is yet to be implemented
Prism is licensed under a BSD-3-Clause "New" or "Revised" License. See LICENSE to learn more.