Skip to content
eonistPublic

About

Color Utils

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ColorLib

img

  • Easily convert between color types: ColorLib, RGB, CMYK, HSL, HSB, HSB, NSColor, CGColor, CLColor
  • Supporting 7 "Hex" color types:

There are 7 "hex" color formats: ""#FF0000","0xFF0000", "FF0000", "F00", "red", 0x00FF00 , 16711935

ColorParser.nsColor("#FF0000",1)//red nsColor
ColorParser.nsColor("FF0",1)//red nsColor
ColorParser.nsColor("0xFF0000",1)//red nsColor
ColorParser.nsColor("#FF0000",1)//red nsColor
ColorParser.nsColor("FF0000",1)//red nsColor
ColorParser.nsColor(0xFF0000,1)//red nsColor
ColorParser.nsColor(16711935,1)//red nsColor

Interpolation:

img

The above animation can be achieved with the simple line bellow

let color = NSColor.green.interpolate(.blue, 0.5)

About

Color Utils

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages