Single source of truth#
The source for all colours are stored in the Photoshop File
This is the single source of truth and all assets origin from this file.
You can define a new colour family space based on the existing colour families.
Please note you’ve to follow these constraints:
There’s a Python builder called
cicd-builder which can be used to create most CI/CD assets.
However, for the CLR file there’s a CLR converter called
json2clr, which creates a CLR file from the JSON asset.
The workflow to build the assets looks like this:
Sphinx will then take the built assets of the
cicd-builder, as well as the static reST files and creates the CI / CD documentation from it:
Please note only the
colours.png files are committed to the repository. The rest of the assets are automatically built by
json2clr via GitLab’s CI/CD pipeline.
colours.psdin Photoshop and edit the colours
Export the new
This should be enough to run the builder and deploy the new colours.
If you’ve new colours or want to change the name, also update the
To setup the environment, run these commands:
make venv source .venv/bin/activate make develop
To most straight-forward way to create the complete documentation with all assets is to run this command:
The built documentation can be found in the
If you want to improve the documentation without running the builder manually, you can also run the Sphinx autobuilder by executing this command:
This will only watch & rebuild the Sphinx documentation in the
docs/ directory. If you update the
colours.png or want to recreate the assets, run
make assets explicitly.
Apple’s Color List file (aka
.clr) is a binary file, containing colours which can be accessed throughout macOS.
Generating the CLR file with Python is a complicated task, since the file is properitary binary. However, in comparison with Python, generating the CLR file with an appropriate API such as in ObjectivC / Swift is a much easier task.
Thus we’ve decided to create a properitary converter from our JSON to the CLR file.
To compile the
json2clr binary, you can use the Swift compiler:
cd confirm/ci/json2clr swiftc json2clr.swift
Please have a look at our Guidelines when contributing to this project.