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 #
This class exposes no enumerations.
Constants #
This class exposes no constants.
Events #
This class exposes no events.
Methods #
Definition | Parameters | Return Type | Description |
---|---|---|---|
Blend | background as Color foreground as Color | Color | Blends two colors together by overlaying foreground onto background then returning the resulting mix. |
Brighten | c as Color DeltaPercent as Integer | Color | Brightens a color by modifying each constituent RGB value by DeltaPercent. |
CartesianDistance | color1 as Color 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 DeltaPercent as Double | Color | Darkens a color modifying its brightness (Color.Value in Xojo). |
DarkerColor | color1 as Color color2 as Color | Color | Returns the darker of the two passed colors. |
Desaturate | c as Color 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. |
GetBrightness | c as Color | Double | Returns the double-value brightness for the specified color. |
GetContrast | color1 as Color color2 as Color | Double | Returns the double-value contrast difference between two colors. |
GetDistance | color1 as Color 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 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 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 color2 as Color | Boolean | |
IsReadableSmall | color1 as Color color2 as Color | Boolean | |
Lighten | c as Color DeltaPercent as Double | Color | Lightens the specified color by DeltaPercent. |
LighterColor | color1 as Color color2 as Color | Color | Returns the lighter of the two passed colors. |
Mix | color1 as Color color2 as Color | Color | Mixes the two colors together. |
Monochromatic | c as Color | Color | Returns a monochrome version of the color. |
MostReadable | c as Color compare() as Color | Color | Returns the most readable complement color from the array. |
MostReadable | c as Color ParamArray compare as Color | Color | |
NamedClosest | c as Color | 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 | Color | Returns a saturation-altered value of the passed color. |
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. |
Properties #
This class exposes no properties.
Examples #
This class currently has no examples.
Notes #
This class currently has no notes.