Build Status

Ruby Gem for decide name of a given color.


Easy Gem Installation

$ gem install colorname

Gemfile Integration

Add this line to your application's Gemfile:

gem 'colorname'

And then execute:

$ bundle


Colorname.find 'f0f8ff'                    # [:aliceblue]

Colorname.find '#00ffff'                   # [:aqua, :cyan]

Colorname.find 143, 188, 143               # [:darkseagreen]

Colorname.find, 0, 255) # [:fuchsia, :magenta]

To find names of most dominant colors of and image

Colorname.find_by_image (url_or_path)       # [:names_of_most_dominant_colors]

Colorname.findbyimage (url_or_path)         # [:names_of_most_dominant_colors]

To find dominant base color name

Colorname.base '32cd32'                    # [:green]

Colorname.base '#FF00CC'                   # [:red]

Colorname.base 25, 150, 255                # [:blue]

Colorname.base, 0, 255) # [:red, :blue]


Bug reports and pull requests are welcome on GitHub at This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.


The gem is available as open source under the terms of the MIT License.