Skip to content

Step 2: Introduce palette pipeline, generators, and multi-scheme support (base16/base24/semantic)#2290

Open
make-42 wants to merge 6 commits into
nix-community:masterfrom
make-42:step-2-inputmapping-clean-root
Open

Step 2: Introduce palette pipeline, generators, and multi-scheme support (base16/base24/semantic)#2290
make-42 wants to merge 6 commits into
nix-community:masterfrom
make-42:step-2-inputmapping-clean-root

Conversation

@make-42
Copy link
Copy Markdown
Contributor

@make-42 make-42 commented Apr 24, 2026

The code for this PR is written off the tip of this PR: #2289

This PR replaces the base16Scheme-centric pipeline with a more general palette system supporting:

  • base16 (required)
  • base24
  • semantic (Material You–style)

Changes

  • Add stylix/generators.nix:
    introduces stylix.palette.generators.{base16, base24, semantic}
    includes tinty + matugen implementations
  • Add stylix/mappings.nix:
    introduces mappingFunction
    includes initial semantic2base16 mapping
  • Replace stylix.base16Scheme with:
    stylix.palette.manual.{base16, base24, semantic}
  • Add the following pipeline:
    manual/generator -> merge -> mappingFunction -> override -> base16 consumption (this will later be changed to allow for themes to be written for different schemes and user preferences making it possible to choose what schemes are consumed in order of priority for available schemes by theme module)
  • override now applies after mapping (base16 only)

There probably needs to be documentation written for this...

This is a direct solution to step 2 outlined in the matugen PR.

It's still lacking how to handle consumption of non base16 schemes but I'm waiting on your input for that.

Here's what the testbeds that are now using matugen (semantic) then mapped to base16 look like:

image

make-42 added 2 commits April 24, 2026 19:32
tinty: move from the haskell generator to tinty as a first step

tinty: move from the haskell generator to tinty as a first step

tinty: move from the haskell generator to tinty as a first step

tinty: move from the haskell generator to tinty as a first step
@stylix-automation stylix-automation Bot added topic: documentation Documentation additions or improvements topic: testbed Testbed changes topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: stylix /stylix/ subsystem labels Apr 24, 2026
@make-42 make-42 requested review from 0xda157 and trueNAHO April 24, 2026 18:27
Comment thread stylix/generators.nix Outdated
Comment thread stylix/generators.nix Outdated
Comment thread stylix/generators.nix
Comment thread stylix/generators.nix
Copy link
Copy Markdown
Contributor Author

@make-42 make-42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright, thanks @philocalyst for your comments! I fixed it up!

@make-42
Copy link
Copy Markdown
Contributor Author

make-42 commented Apr 24, 2026

Btw this is now a step forward compared to the code from the matugen PR feature wise

@make-42
Copy link
Copy Markdown
Contributor Author

make-42 commented Apr 24, 2026

with this being valid usage:
image

but also this since matugen now provides a base16 output format:
image

@make-42
Copy link
Copy Markdown
Contributor Author

make-42 commented Apr 24, 2026

with the first config behaving exactly like the code from the matugen PR

@make-42 make-42 force-pushed the step-2-inputmapping-clean-root branch 3 times, most recently from 6e9c524 to f5b733a Compare April 24, 2026 19:53
@make-42 make-42 force-pushed the step-2-inputmapping-clean-root branch from f5b733a to 422e8e4 Compare April 24, 2026 19:57
Comment thread stylix/palette.nix Outdated
Comment thread stylix/palette.nix Outdated
Comment thread stylix/palette.nix
Comment thread stylix/palette.nix Outdated
@make-42
Copy link
Copy Markdown
Contributor Author

make-42 commented Apr 30, 2026

alright, i took what you said into account and added extra documentation to configuration.md

@make-42 make-42 requested a review from 0xda157 April 30, 2026 21:49
@make-42 make-42 force-pushed the step-2-inputmapping-clean-root branch from 4e20103 to e1e2a2b Compare May 1, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: documentation Documentation additions or improvements topic: flake /flake.nix, /flake.lock, and /flake/ subsystems topic: stylix /stylix/ subsystem topic: testbed Testbed changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants