From 1c0c070e4c9a47b6b43f5d38101140b697272f6f Mon Sep 17 00:00:00 2001 From: partisani <88511157+partisani@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:24:04 -0300 Subject: [PATCH 1/2] updated information on base16 The base16-schemes repository was archived and outdated, as well as the schemeFromYAML function, so i decided to help people who want to make their own themes or use themes that weren't released in the old base16-schemes repository --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 53f5b93..ba40111 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,8 @@ All of these are exposed at `nix-colors.lib`. ### `schemeFromYAML` This function is used internally to convert base16's schemes to nix-colors -format, but is exposed so you can absolutely do the same. +format, but is exposed so you can absolutely do the same. Sadly, it was +deprecated. Just grab (or create yours) a `.yaml` file, read it into a string (with `readFile`, for example) and you're golden: @@ -206,6 +207,16 @@ Just grab (or create yours) a `.yaml` file, read it into a string (with This path can come from wherever nix can read, even another repo! That's what we do to expose base16's schemes. +If you feel like the fact `schemeFromYAML` being deprecated is enough +for you to not use it, then just use `builtins.fromTOML` and a `.toml` file +instead. + +Keep in mind this method will require you to convert the `.yaml` file +into a `.toml` one, but comes with the advantage that you will be able +to use color schemes which weren't released in the currently archived +[base16-schemes](https://github.com/base16-project/base16-schemes) repo + + ### More soon(TM) We plan on helping you turn existing base16 templates into nifty nix functions @@ -236,7 +247,10 @@ in { } ``` -# Upstreaming new schemes +# ~~Upstreaming new schemes~~ + +only kept here for posterity, as the [base16-schemes](https://github.com/base16-project/base16-schemes) +repository was archived and `nix-colors` wasn't updated to use the new [schemes](https://github.com/tinted-theming/schemes) repo. Please please upstream nice schemes you have created! From ca801348aaee38621c57546bc4524fef0f9d496d Mon Sep 17 00:00:00 2001 From: partisani <88511157+partisani@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:32:32 -0300 Subject: [PATCH 2/2] small fix I forgot to mention that the slug field needs to be added --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ba40111..a793405 100644 --- a/README.md +++ b/README.md @@ -212,9 +212,9 @@ for you to not use it, then just use `builtins.fromTOML` and a `.toml` file instead. Keep in mind this method will require you to convert the `.yaml` file -into a `.toml` one, but comes with the advantage that you will be able -to use color schemes which weren't released in the currently archived -[base16-schemes](https://github.com/base16-project/base16-schemes) repo +into a `.toml` one (and add a slug field), but comes with the advantage +that you will be able to use color schemes which weren't released in the +currently archived [base16-schemes](https://github.com/base16-project/base16-schemes) repo ### More soon(TM)