https://github.com/alexeevit/color_name
A simple ruby gem that allows to get the name of a color given as a hex
https://github.com/alexeevit/color_name
color colornames colors gem rails ruby
Last synced: 3 months ago
JSON representation
A simple ruby gem that allows to get the name of a color given as a hex
- Host: GitHub
- URL: https://github.com/alexeevit/color_name
- Owner: alexeevit
- License: mit
- Created: 2018-06-20T13:34:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-06-23T18:45:09.000Z (about 5 years ago)
- Last Synced: 2024-04-26T13:20:43.525Z (about 2 years ago)
- Topics: color, colornames, colors, gem, rails, ruby
- Language: Ruby
- Homepage: https://rubygems.org/gems/color_name
- Size: 95.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ColorName
ColorName is a simple ruby gem that allows you to get a name of any color. Based on [Name That Color](https://www.color-blindness.com/color-name-hue-tool/js/ntc.js).
## Install
```ruby
gem install color_name
```
Or add the following line to your Gemfile:
```ruby
gem 'color_name'
```
## Usage
```ruby
irb(main):001:0> ColorName.get('#f00')
=> "Red"
irb(main):002:0> ColorName.get('#e02253')
=> "Amaranth"
```
# License
Licensed under the MIT license, see the separate LICENSE file.