Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Why does the dec version of RGB look different? #711

Open
GideonWolfe opened this issue Dec 30, 2024 · 2 comments
Open

[Question] Why does the dec version of RGB look different? #711

GideonWolfe opened this issue Dec 30, 2024 · 2 comments

Comments

@GideonWolfe
Copy link

GideonWolfe commented Dec 30, 2024

Forgive me if I'm misunderstanding something, but here's my issue.

Usually I use with config.lib.stylix.colors.withHashtag to acces ${baseXX} values required by most programs.

Sometimes I use with config.lib.stylix.colors when I need to access specific RGB values like ${baseXX-rgb-r}.

However I have seen some applications take rgb() vectors in normalized/unit form, so each component is normalized from 0 - 1 instead of 0 - 255. From my initial reading of the Stylix docs, I should be able to access these values with ${baseXX-dec-r}.

The programs seem to be accepting these values, but the issue is that the same color (ie. base00) looks different when generated via dec method.

To illustrate this, I plugged the colors generated by dec into an online color picker.
image
The true color should be identical to the background of the webpage, which was generated with standard withHashtag ${base00}.

PS: I'm also a bit confused about accessing other colors in the schema. I saw that you have a big refactor in your roadmap for the naming schemes, but how would I go about referencing additional colors as described here? I would like to access colors like ${bright-blue} that are generated by base16.nix but aren't exposed via stylix

@GideonWolfe
Copy link
Author

Upon messing around further with the picker website, I noticed that it isn't possible to manually enter the "correct" value output by stylix... Is it a valid color value? The value

"${base00-dec-r},${base00-dec-g},${base00-dec-b}"

generates

"0.117188,0.179688,0.179688"

But the site doesn't allow me to actually plug in those numbers, and give that green instead. Other programs seem to have the same issue, for example f3d.
image

@trueNAHO
Copy link
Collaborator

Cc: @danth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants