# Color

Learn how to use the Color class in Wijmo in this documentation topic

## Content


The __Color__ class parses colors specified as CSS strings and exposes their red, green, blue, and alpha channels as read-write properties.

It also provides __fromHsb__ and __fromHsl__ methods for creating colors using the HSB and HSL color models instead of RGB, as well as __getHsb__ and __getHsl__ methods for retrieving the color components using those color models.

## Interpolating colors

The __Color__ class also has an __interpolate__ method that creates colors by interpolating between two colors using the HSL model. This method is especially useful for creating color animations with the __animate__ method. 

##### Example
```javascript
import * as wijmo from '@mescius/wijmo';

const color1 = new wijmo.Color('#c15dc1');
const color2 = new wijmo.Color('#0070c0');

// determines how close the interpolation should be to the second color
const percentage = .5; // value between 0-1

let interpolatedColor = new wijmo.Color.interpolate(color1, color2, percentage);
```