Create a gradient with 16bit color values
Posted: 2015-01-14T12:21:36-07:00
I've got a background template and an image using this background. On the lower half of the background there is a gradient placed on the image.
I want to reproduce the gradient on the template matching the color in the image as good as possible.
For this I first tried to figure out which blending method was used to blend the gradient to the background. It seems it was a multiply. To get this information I simply took a color value from the background and from the same position from the picture. Now I used the formula:
I did this for several colors and always the values I received for RGB are mostly identical (they vary bei 1-2 sometimes), so I think I got the correct gradient color.
My issue with this is, the gradient color I got this way has values greater than 255. This is my color in dec 177 299 320.
For my next steps I want to create a radiant with convert like
and then combine it with composite multiply.
I think I need a gradient created with 16bit color values instead of 8bit, but I can't find a way to tell gradient my color values.
I want to reproduce the gradient on the template matching the color in the image as good as possible.
For this I first tried to figure out which blending method was used to blend the gradient to the background. It seems it was a multiply. To get this information I simply took a color value from the background and from the same position from the picture. Now I used the formula:
Code: Select all
Result = (Source * Gradient) / 255
My issue with this is, the gradient color I got this way has values greater than 255. This is my color in dec 177 299 320.
For my next steps I want to create a radiant with convert like
Code: Select all
convert -size 1000x1000 gradient:none-#2b0140 test.png
I think I need a gradient created with 16bit color values instead of 8bit, but I can't find a way to tell gradient my color values.