Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 589 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 589 Bytes

Get Color Name

The utility aims to simplify naming of color constants. It accepts color HEX code or rgb()

Installation

npm i get-user-friendly-color-name -g

Usage examples

  • with HEX code:
# expected result: HANUMAN_GREEN
clrnm 45FEA9
  • with rgb():
# expected result: CATHODE_GREEN
clrnm "rgb(0,255,78)"
  • get detailed response:
# expected result:
# {
#   name: 'Biloba Flower',
#   value: '#ae99d2',
#   rgb: { r: 174, g: 153, b: 210 },
#   distance: 5.196152422706632,
#   upperCaseName: 'BILOBA_FLOWER'
# }
clrnm A998D3 --full