Core Docs | Additional Modules Docs

sb.colors.toArray


@Description: Converts hex or rgb formatted color strings to an array
@File: colors/toArray.js
@Author: Paul Visco
@Param: An rgb or hex color string
@Return: Array An array of the r,g and b colors e.g. [255,255,255]
@Example:
var colorArray = sb.colors.toArray('#ffffff');
var colorArray = sb.colors.toArray('rbg(255,255,255)');

//both return [255,255,255]