Getting started
Spectrum is a lightweight library with no dependencies, making it compatible with any JavaScript environment. This page will guide you through the installation process and provide a simple example of how to use Spectrum for color manipulation.
Installation
To start using Spectrum in your project, simply run one of the following commands in your terminal:
Example usage
In the example above, we initiate a new Spectrum
instance using one of the
available color spaces: hex
, hsl
, or rgb
as the first argument. The second
argument can be an array
or a string
. For more details, refer to the
Spectrum class API reference.
After initializing the instance, you can apply transformation methods provided
by the library. In this example, we change hue
and lightness
values,
resulting in a new Spectrum instance with the modified color. You can then
access the hsl and hex properties of the new color.
Next steps
For more in-depth information about using Spectrum, explore the API Documentation section.
Thank you for choosing Spectrum! ๐