Classes
Members
Methods
(static) CSSToRGB(css, includeAlphaopt) → {RGBColor}
Converts the specified css color to an RGB one
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
css |
String
|
The name of the color to convert |
||
includeAlpha |
Boolean
|
<optional> |
true |
Whether or not to include Alpha in the return value |
Throws:
(static) getType(color) → {ColorType}
Returns the type of the specified color and whether or not it is valid
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
color |
Color
|
String
|
Number
|
RGBColor
|
The color to analyze |
(static) HexToRGB(hex, includeAlphaopt) → {RGBColor}
Converts the specified hex color to an RGB one
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
hex |
String
|
The hex color to convert |
||
includeAlpha |
Boolean
|
<optional> |
true |
Whether or not to include Alpha in the return value |
Throws:
toHex(includeAlphaopt) → {String}
Returns Color#value as a valid hex color
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
includeAlpha |
Boolean
|
<optional> |
true |
Whether or not to include Alpha in the return value |
Throws:
toRGB(includeAlphaopt) → {RGBColor}
Returns Color#value as a valid RGB color
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
includeAlpha |
Boolean
|
<optional> |
true |
Whether or not to include Alpha in the return value |