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

Colors and intensities of glint and cursor should be separate properties— and colors should stay within their gamuts #39

Closed
ptdev opened this issue Oct 31, 2022 · 2 comments

Comments

@ptdev
Copy link

ptdev commented Oct 31, 2022

Hi,

First of all, thanks for building such a cool project.

Now, I'm having some trouble figuring out what are the ranges for the RGB colors that we can set for backgroundColor, glintColor and cursorColor.

On most examples, the numbers used are decimals in the 0-1 ranges that's used for stripecolors, pallette, etc.

But then on the default config we have (for example) the following: cursorColor: { space: "rgb", values: [1.5, 2, 0.9] }

So, we have a 1.5 and a 2 value there. What exactly do these represent?

So what are the RGB color ranges for those parameters? Are these 0-1 range? 0-10 range? 0-255 range?

Cheers

@Rezmason
Copy link
Owner

Rezmason commented Nov 1, 2022

Thanks for your interest in the project!

You're rightfully confused, this is confusing and I should change it.

These are RGB colors, with zero representing black and one representing white. The reason they're sometimes more than one is because the colors can exist outside RGB space, which helps them be really bright.

That's not supported in the HSL versions of these colors, which is another hint that this is the wrong approach.

I'll change this shortly so that backgroundColor, glintColor and cursorColor are all colors within their color space, and separately, something like glintIntensity and cursorIntensity amplify their brightness.

glintBrightness (and glintContrast) already exist, and factor into the glint in an earlier step of the pipeline, which confuses things. This is what I get for supporting fifty properties in the config. I'll work something out.

In the meantime, just know that these RGB values operate in the zero-is-black, white-is-one range.

@Rezmason Rezmason changed the title Custom color ranges? Colors and intensities of glint and cursor should be separate properties— and colors should stay within their gamuts Nov 1, 2022
@ptdev
Copy link
Author

ptdev commented Nov 1, 2022

Ah, that is it then.

I assumed it would be 0-1, was just confused about the higher values and had no idea that colors could exist outside of the rgb color space.

But your reply clarified it. And thanks for adding/supporting those 50 config options. ❤️
Even when a little confusing, being able to configure this effect greatly enhances it

Cheers and thanks again. 👍
Closing the issue

@ptdev ptdev closed this as completed Nov 1, 2022
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