ArgumentError (invalid color name: #ffffff)
fadyZohdy opened this issue · comments
fady zohdy commented
def self.from_color(color_name)
result = Magick4J::ColorDatabase.lookUp(color_name)
raise ArgumentError, "invalid color name: #{color_name}" if result.nil?
result
end
why isn't there support for hex color names ?
Sergio Arbeo commented
#ffffff
is not a color name but the color itself. You can get the same result constructing a pixel packet directly with 255, 255, 255.
Thank you!
fady zohdy commented
thank u. didn't think u would answer this fast 😀