rmagick / rmagick

Ruby bindings for ImageMagick
https://rmagick.github.io/
MIT License
694 stars 140 forks source link

Change method that returns a color name to return a hex string #1592

Closed Watson1978 closed 2 weeks ago

Watson1978 commented 2 weeks ago

Fix https://github.com/rmagick/rmagick/issues/1400

The some methods to get color information returned either a hex string or a color name. Depending on the image settings, the color names were not returned as expected.

So, this patch will always return hex string as color information.

The methods affected by this change are as follows:


Watson1978 commented 2 weeks ago

I guess I should also change the default value of the hex argument for Pixel#to_color.

mockdeep commented 2 weeks ago

@Watson1978 this seems reasonable to me. What does ImageMagick return for these values?

This seems like a breaking change. Should this be part of 6.0?

Watson1978 commented 2 weeks ago

What does ImageMagick return for these values?

Image#background_color and others will return RGBA hex string.

This seems like a breaking change. Should this be part of 6.0?

Yes, you are right.