Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Conversation

wbrege
Copy link

@wbrege wbrege commented Dec 13, 2021

Some frameworks only accept RGB values in normalized form, this change would help when working with them.

@kepi
Copy link
Owner

kepi commented Dec 13, 2021

Thanks for PR and the idea. I never heard about normalized RGB before :) but after first article I found now (https://aishack.in/tutorials/normalized-rgb/) it looks like divisor should be sum of R+G+B instead of 255? Also it would be probably better to get invidiual values of r, g and b from color object instead of splitting the html value.

Anyway I would like to add option to enable/disable this and also show it in preview box.

@wbrege
Copy link
Author

wbrege commented Dec 16, 2021

Thank you for taking a look at my PR! My motivation for this change is that I'm working currently with a version of OpenGL that only accepts R, G, and B values that are individually normalized, as opposed to having the entire range of colours normalized as described in that article, though I'd be happy to throw that in as another option since I'm working on this anyway, if you'd like.

Would you mind pointing me to the documentation for the color object? I'm not sure what library you're using

@kepi kepi added type: idea Feature requests comp: colors Current and new color preview and related stuff labels May 28, 2022
@kepi kepi added this to the v0.6.x milestone May 28, 2022
@kepi kepi removed this from the v0.6.x milestone Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
comp: colors Current and new color preview and related stuff type: idea Feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants