So like I said in the title, I'm trying to make a color picker (with HTML/CSS/JS, if that matters) and I'm basing it off of DuckDuckGo's color picker (seen here).
They use a semi-transparent image overlayed on a div with a solid color. I thought that the image was just a vertical white --> black gradient and a horizontal and vertical opacity gradient. It turns out its more complicated than that.
I downloaded the image they use for their color picker and removed the alpha channel. I've uploaded it here. By the way, it appears they have subtle noise over it, for some reason.
I don't know what equation is used to generate this.
I do know that the alpha channel is equal to 1 - (x * y)
, but I don't know what algorithm is used to get the rgb channels.
I would also like to generate a similar image for an HSL color picker. I assume its the same algorithm, but scaled vertically by half and mirrored. Is that correct?