Skip to content

moizmb/name-that-colour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Information

Ntc is a Ruby port of the javascript library ntc.js. Ntc will give you the name of the closest defined color from Resene RGB Values list, Wikipedia, Crayola, and Color-Name Dictionaries.

Basic Usage

Ntc can be used as

require "./ntc"

color = Ntc.new("#000000")
# #<Ntc:0x00000001a63758 @color="#000000">

color.name
# ["#000000", "Black", true]

color_rgb = color.name[0] # RGB value of the closest match
# "#000000"
color_name = color.name[1] # Name of closest match
# "Black"
color_exactmatch = color.name[2] # True if exact color match
# true

License

About

A ruby port of ntc.js by Chirag Mehta

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages