Table of Contents
Images #
About #
GraffitiColors is the ultimate color companion for Xojo. With this product you can get valuable information about specified colors such as brightness, luminance, hue, distances; you can calculate proper complements for maximum readability; or retrieve system-specific UI color definitions.
Features:
- Bootstrap compatible color palettes
- Material UI color definitions
- Assorted arrays of complementary color palettes
- Massive list of named colors
- Native color retrieval for macOS
- Native color retrieval for Windows, including the immersive color definitions for both Dark and Light UIs
- Color comparison and modification functions
Enumerations #
Name | Values |
---|
This class exposes no enumerations.
Constants #
Name | Type | Value |
---|
This class exposes no constants.
Events #
Definition | Description |
---|---|
This class exposes no events. |
Methods #
Definition | Description |
---|---|
Blend(background as Color, foreground as Color) as Color | Blends two colors together by overlaying foreground onto background then returning the resulting mix. |
Brighten(c as Color, DeltaPercent as Integer) as Color | Brightens a color by modifying each constituent RGB value by DeltaPercent. |
Complement(c as Color) as Color | Returns a color whose hue is calculated to complement the passed value. |
ComplementReadable(c as Color) as Color | Returns the readable complement of the passed value. Return is black or white. |
Darken(c as Color, DeltaPercent as Double) as Color | Darkens a color modifying its brightness (Color.Value in Xojo). |
DarkerColor(color1 as Color, color2 as Color) as Color | Returns the darker of the two passed colors. |
Desaturate(c as Color, DeltaPercent as Double) as Color | Desaturated the passed color by DeltaPercent. |
FromHex(hexValue as String) as Color | Parses a HEX-3, HEX-6, or HEX-8 value to a Xojo Color object. |
GetBrightness(c as Color) as Double | Returns the double-value brightness for the specified color. |
GetContrast(color1 as Color, color2 as Color) as Double | Returns the double-value contrast difference between two colors. |
GetDistance(color1 as Color, color2 as Color) as Double | Returns the cartesian distance between two colors. |
GetLuminance(c as Color) as Double | Returns the calculate luminance of the color. |
Hue(c as Color, DeltaPercent as Color) as Color | Returns the passed color value with altered hue. |
Invert(c as Color) as Color | Inverts the passed color. |
IsDark(c as Color) as Boolean | Returns True if the color’s calculated brightness is less than 128. |
IsLight(c as Color) as Boolean | Returns True if the color’s calculated brightness is greater than 128. |
IsReadableLarge(color1 as Color, color2 as Color) as Boolean | Returns True if text using one color as the background and the other as foreground is readable. |
IsReadableMedium(color1 as Color, color2 as Color) as Boolean | |
IsReadableSmall(color1 as Color, color2 as Color) as Boolean | |
Lighten(c as Color, DeltaPercent as Double) as Color | Lightens the specified color by DeltaPercent. |
LighterColor(color1 as Color, color2 as Color) as Color | Returns the lighter of the two passed colors. |
Mix(color1 as Color, color2 as Color) as Color | Mixes the two colors together. |
Monochromatic(c as Color) as Color | Returns a monochrome version of the color. |
MostReadable(c as Color, compare() as Color) as Color | Returns the most readable complement color from the array. |
MostReadable(c as Color, ParamArray compare as Color) as Color | |
NamedClosest(c as Color ) as Dictionary | Returns a Dictionary object containing the “name” and “value” keys for the closest Named color to the one specified. |
Saturate(c as Color, DeltaPercent as Double) as Color | Returns a saturation-altered value of the passed color. |
toHex(c as Color) as String | Returns a HEX string of the color’s RGB values. |
toHex8(c as Color) as String | Returns a HEX8 string of the color’s RGBA value. |
toRGBAStringWeb(c as Color) as String | Returns a web-compatible RGBA string representation of the color. |
toRGBAStringXojo(c as Color) as String | Returns a Xojo-compatible RGBA string representation of the color. |
toRGBString(c as Color) as String | Returns an RGB string representation of the color. |
Properties #
Name | Type | Default Value | Description |
---|
This class exposes no properties.
Examples #
This class currently has no examples.
Notes #
This class currently has no notes.