Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
desktop:colors [2019/10/21 11:42]
agcyphers [Events]
desktop:colors [2019/10/23 05:53] (current)
Line 23: Line 23:
 ==== Methods ==== ==== Methods ====
 ^ Definition ​     ^ Description ​      ^ ^ Definition ​     ^ Description ​      ^
-This class exposes no methods+| 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 ==== ==== Properties ====
 ^ Name      ^ Type       ^ Default Value       ^ Description ​      ^ ^ Name      ^ Type       ^ Default Value       ^ Description ​      ^