npm.io
1.1.0 • Published 8 years ago

simple-color

Licence
MIT
Version
1.1.0
Deps
0
Size
5 kB
Vulns
0
Weekly
0

Simple Color

Simple color operations and abstractions.

colorToString

(color: Color) => string

This function takes a Color object and returns the CCS string version of the color.

makeHSLColor

(hue: number, saturation: number, lightness: number, alpha?: number) => HSLAColor

This function takes some arguments and creates a HSLAColor object.

makeRGBColor

(red: number, green: number, blue: number alpha?: number) => RGBAColor

This function takes some arguments and creates a RGBAColor object.

Color

This interface describes a color object. Implementing objects are:

  • HSLAColor
  • RGBAColor