1.1.0 • Published 6 years ago

simple-color v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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