# GraffitiColors
Module
## Members
- [MacOS](/macos.md)
- [Named](/named.md)
- [Material](/material.md)
- [Bootstrap](/bootstrap)
- [Palettes](/palettes.md)
- [SystemAware](/systemaware.md)
- [Windows](/windows)
- [iOS](/ios.md)
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
### iOS
| 32-Bit | 64-Bit |
| :---: | :---: |
| False | True |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Blend | background as Color <br> foreground as Color | Color | Blends two colors together by overlaying foreground onto background then returning the resulting mix. |
| Brighten | c as Color <br> DeltaPercent as Integer | Color | Brightens a color by modifying each constituent RGB value by DeltaPercent. |
| CartesianDistance | color1 as Color <br> color2 as Color | Double | Returns the cartesian (or Euclidian) distance between two color calues. |
| Complement | c as Color | Color | Returns a color whose hue is calculated to complement the passed value. |
| ComplementReadable | c as Color | Color | Returns the readable complement of the passed value. Return is black or white. |
| Darken | c as Color <br> DeltaPercent as Double | Color | Darkens a color modifying its brightness (Color.Value in Xojo). |
| DarkerColor | color1 as Color <br> color2 as Color | Color | Returns the darker of the two passed colors. |
| Desaturate | c as Color <br> DeltaPercent as Double | Color | Desaturated the passed color by DeltaPercent. |
| FromHex | hexValue as String | Color | Parses a HEX-3, HEX-6, or HEX-8 value to a Xojo Color object. |
| FromRGBAString | rgbValue as String | Color | Returns a color from a string matching the format rgba(0,0,0,1.0). |
| GetBrightness | c as Color | Double | Returns the double-value brightness for the specified color. |
| GetContrast | color1 as Color <br> color2 as Color | Double | Returns the double-value contrast difference between two colors. |
| GetDistance | color1 as Color <br> color2 as Color | Double | Returns the cartesian distance between two colors. |
| GetLuminance | c as Color | Double | Returns the calculate luminance of the color. |
| Hue | c as Color <br> DeltaPercent as Double | Color | Returns the passed color value with altered hue. |
| Invert | c as Color | Color | Inverts the passed color. |
| IsDark | c as Color | Boolean | Returns True if the color's calculated brightness is less than 128. |
| IsLight | c as Color | Boolean | Returns True if the color's calculated brightness is greater than 128. |
| IsReadableLarge | color1 as Color <br> color2 as Color | Boolean | Returns True if text using one color as the background and the other as foreground is readable. |
| IsReadableMedium | color1 as Color <br> color2 as Color | Boolean | Returns True if text using one color as the background and the other as foreground is readable. |
| IsReadableSmall | color1 as Color <br> color2 as Color | Boolean | Returns True if text using one color as the background and the other as foreground is readable. |
| Lighten | c as Color <br> DeltaPercent as Double | Color | Lightens the specified color by DeltaPercent. |
| LighterColor | color1 as Color <br> color2 as Color | Color | Returns the lighter of the two passed colors. |
| Mix | color1 as Color <br> color2 as Color <br> DeltaPercent as Double | Color | Mixes the two colors together. |
| Monochromatic | c as Color | Color | Returns a monochrome version of the color. |
| MostReadable | c as Color <br> compare() as Color | Color | Returns the most readable complement color from the array. |
| MostReadable | c as Color <br> ParamArray compare as Color | Color | Returns the most readable complement color from the array. |
| NamedClosest | c as Color | Dictionary | Returns a Dictionary object containing the “name” and “value” keys for the closest Named color to the one specified. |
| RandomColor | randomizeAlphaChannel as Boolean = False | Color | Returns a random color. |
| Saturate | c as Color <br> DeltaPercent as Double | Color | Returns a saturation-altered value of the passed color. |
| SetAlphaChannel | c as Color <br> value as Integer | Color | Returns a new color value with the alpha channel value set the value specified. |
| toHex | c as Color | String | Returns a HEX string of the color's RGB values. |
| toHex8 | c as Color | String | Returns a HEX8 string of the color's RGBA value. |
| toRGBAStringWeb | c as Color | String | Returns a web-compatible RGBA string representation of the color. |
| toRGBAStringXojo | c as Color | String | Returns a Xojo-compatible RGBA string representation of the color. |
| toRGBString | c as Color | String | Returns an RGB string representation of the color. |