Skip to content

Updating my GitHub Languages Colour Palette Project

Back in 2019 I put together a script for pulling the list of colours used by GitHub from their Linguist gem into a set of colour palette formats. Over time it has drifted further and further out of date – I've now fixed that.

The original script I put together worked fine, but I would have needed to run it regularly to generate updated palette files. That's not something which ever actually happened, so it just sat there getting more and more stale over time. Not great.

I decided to revisit it and fix a few niggles along the way:

  • The script was written a long time ago so it could use some attention to bring it more up to date.
  • Linguist's primary branch is now called main, and the repo has moved to a different organisation. This wasn't a breaking change (GitHub redirected the old URLs) but it was another example of its staleness.
  • Because the palettes were generated from the most recent version of the file in the repo, it might potentially reflect a state which is newer than the latest Linguist release. What I really wanted was to use the state of the latest release (while keeping the option of using main).
  • It needs to stay up to date moving forward. Adding a GitHub Actions workflow to run on a schedule is a nice easy solution to this.

At time of writing, all this is now in place and the current colour palettes reflect Linguist 9.6.0. That means the colours should be current with what can be seen on GitHub today. And this should now track releases going forward.

There's also a file which sits alongside the palettes named UPSTREAM_VERSION which states the version of Linguist from which the palettes were built. This file is just for info.

If you want to grab the palettes for any reason, go straight to the palettes folder and get the format you need.

If you want to learn more, including running the generation process yourself or running a variation of the process against a different release, main, or something else, check out the readme file.