Hey, I have a problem to find all helpful sources, so I’m asking here if you already worked on it and/or have a link for useful resource.
What I’m looking on:
All colour standards that are used now (like RGB).
All algorithms to convert between all of them + info if it’s not possible directly between A and B.
All algorithms that are used now for colour manipulation (like invert, sepia)
For now I have implemented:
HEX, HSL and RGB - all with alpha
Known convertions:
a) HEX -> RGB
b) HSL -> RGB
c) RGB -> HEX
d) RGB -> HSL
e) no HEX <=> HSL - reason: requires RGB
I have few algorithms for grayscale and sepia, but I don’t know how to apply them in percentage.
I found this page which allow preview of CSS filters. I would like to have algorithms for them and even more (if any). Of course some of them (like shadow) applies to whole image and I’m looking for algorithms for manipulating of single colors (like sepia).
Extra request!
I know easy algorithm for RGB to make colour inverted:
{red, green, blue} = {255, 255, 255}
inverted_red = 255 - red
inverted_green = 255 - green
inverted_blue = 255 - blue
but I heard about something like spitting palette into planes and inverting colour with keeping plane. Do you know how it works?
All of them I plan to implement in one of my libraries.
@LostKobrakai: I heard about CMYK, but don’t have a time to research about it.
I was focused on HEX, HSL and RGB, because they are used in CSS and it’s why I want to finish them first. Later I will look at them.
Darkening and Lightening will be of course supported. After conversion there will be one of the most important features.
@amnu3387: Great! I know Ruby, so I will take a look at its code. To be honest I could think about it before posting.
Pallets are really interesting idea. I will definitely try it.