kepi / chromeEyeDropper

Eye Dropper and Color picker extension for Google Chrome
https://eyedropper.org
208 stars 73 forks source link

Add additional color box for normalized rgb values #193

Open wbrege opened 2 years ago

wbrege commented 2 years ago

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

kepi commented 2 years ago

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 commented 2 years ago

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