So I have this base image:
And in photoshop I do a basic layer color overlay, with the rgb colors:
r: 244, g: 93, b: 0
This gives me the amazingly vibrant:
What I’m trying to do is colorize the same image in rmagick, so if I do the following colorize:
img = Magick::Image.read('brush.png').first
img = img.colorize(100, 100, 100, Magick::Pixel.new(244, 93, 0, 1))
img.format = 'png'
img.to_blob
It gives me this really washed out orange image:
My questions is, how do I colorize this image with those rgb params in imagemagick / rmagick, to get the same vibrant color that I got in photoshop.
Thanks.
2
Answers
At the commandline, I think you want something like this:
So, with the
+clone
I am creating another layer the same size as your image and entirely filling it 100% with your orange colour and then composing it over your image with the-composite
to blend the opacity and colour.I really don’t speak Ruby, but I think it will be along these lines:
Mark Setchell’s command line works for me (Windows), with slight modifications…
Found this link on recolouring with rmagick…
ftp://belagro.com/Redmine/ruby/lib/ruby/gems/1.8/gems/rmagick-2.12.0/doc/colorize.rb.html
Based on the code in the above link, with the greyscale conversion removed, does the example below work (I don’t have ruby)?
Used a colour picker to get the hex of your orange colour –
rgb(244,93,0)
=#A50026