library-ts/browser/colors/Colors.ts

182 lines
12 KiB
TypeScript

import { HTMLColorParser } from './HTMLColorParser';
export class Colors
{
static lighten( color:string, value:number )
{
let htmlColor = HTMLColorParser.fromString( color );
return htmlColor.lighten( value ) + "";
}
static saturate( color:string, value:number )
{
let htmlColor = HTMLColorParser.fromString( color );
return htmlColor.saturate( value ) + "";
}
static shiftHue( color:string, value:number )
{
let htmlColor = HTMLColorParser.fromString( color );
return htmlColor.shiftHue( value ) + "";
}
static fade( color:string, value:number )
{
let htmlColor = HTMLColorParser.fromString( color );
return htmlColor.fade( value ) + "";
}
static readonly black = HTMLColorParser.fromStringHexColor( "#000000" );
static readonly silver = HTMLColorParser.fromStringHexColor( "#c0c0c0" );
static readonly gray = HTMLColorParser.fromStringHexColor( "#808080" );
static readonly white = HTMLColorParser.fromStringHexColor( "#ffffff" );
static readonly maroon = HTMLColorParser.fromStringHexColor( "#800000" );
static readonly red = HTMLColorParser.fromStringHexColor( "#ff0000" );
static readonly purple = HTMLColorParser.fromStringHexColor( "#800080" );
static readonly fuchsia = HTMLColorParser.fromStringHexColor( "#ff00ff" );
static readonly green = HTMLColorParser.fromStringHexColor( "#008000" );
static readonly lime = HTMLColorParser.fromStringHexColor( "#00ff00" );
static readonly olive = HTMLColorParser.fromStringHexColor( "#808000" );
static readonly yellow = HTMLColorParser.fromStringHexColor( "#ffff00" );
static readonly navy = HTMLColorParser.fromStringHexColor( "#000080" );
static readonly blue = HTMLColorParser.fromStringHexColor( "#0000ff" );
static readonly teal = HTMLColorParser.fromStringHexColor( "#008080" );
static readonly aqua = HTMLColorParser.fromStringHexColor( "#00ffff" );
static readonly orange = HTMLColorParser.fromStringHexColor( "#ffa500" );
static readonly aliceblue = HTMLColorParser.fromStringHexColor( "#f0f8ff" );
static readonly antiquewhite = HTMLColorParser.fromStringHexColor( "#faebd7" );
static readonly aquamarine = HTMLColorParser.fromStringHexColor( "#7fffd4" );
static readonly azure = HTMLColorParser.fromStringHexColor( "#f0ffff" );
static readonly beige = HTMLColorParser.fromStringHexColor( "#f5f5dc" );
static readonly bisque = HTMLColorParser.fromStringHexColor( "#ffe4c4" );
static readonly blanchedalmond = HTMLColorParser.fromStringHexColor( "#ffebcd" );
static readonly blueviolet = HTMLColorParser.fromStringHexColor( "#8a2be2" );
static readonly brown = HTMLColorParser.fromStringHexColor( "#a52a2a" );
static readonly burlywood = HTMLColorParser.fromStringHexColor( "#deb887" );
static readonly cadetblue = HTMLColorParser.fromStringHexColor( "#5f9ea0" );
static readonly chartreuse = HTMLColorParser.fromStringHexColor( "#7fff00" );
static readonly chocolate = HTMLColorParser.fromStringHexColor( "#d2691e" );
static readonly coral = HTMLColorParser.fromStringHexColor( "#ff7f50" );
static readonly cornflowerblue = HTMLColorParser.fromStringHexColor( "#6495ed" );
static readonly cornsilk = HTMLColorParser.fromStringHexColor( "#fff8dc" );
static readonly crimson = HTMLColorParser.fromStringHexColor( "#dc143c" );
static readonly cyan = HTMLColorParser.fromStringHexColor( "#00ffff" );
static readonly darkblue = HTMLColorParser.fromStringHexColor( "#00008b" );
static readonly darkcyan = HTMLColorParser.fromStringHexColor( "#008b8b" );
static readonly darkgoldenrod = HTMLColorParser.fromStringHexColor( "#b8860b" );
static readonly darkgray = HTMLColorParser.fromStringHexColor( "#a9a9a9" );
static readonly darkgreen = HTMLColorParser.fromStringHexColor( "#006400" );
static readonly darkgrey = HTMLColorParser.fromStringHexColor( "#a9a9a9" );
static readonly darkkhaki = HTMLColorParser.fromStringHexColor( "#bdb76b" );
static readonly darkmagenta = HTMLColorParser.fromStringHexColor( "#8b008b" );
static readonly darkolivegreen = HTMLColorParser.fromStringHexColor( "#556b2f" );
static readonly darkorange = HTMLColorParser.fromStringHexColor( "#ff8c00" );
static readonly darkorchid = HTMLColorParser.fromStringHexColor( "#9932cc" );
static readonly darkred = HTMLColorParser.fromStringHexColor( "#8b0000" );
static readonly darksalmon = HTMLColorParser.fromStringHexColor( "#e9967a" );
static readonly darkseagreen = HTMLColorParser.fromStringHexColor( "#8fbc8f" );
static readonly darkslateblue = HTMLColorParser.fromStringHexColor( "#483d8b" );
static readonly darkslategray = HTMLColorParser.fromStringHexColor( "#2f4f4f" );
static readonly darkslategrey = HTMLColorParser.fromStringHexColor( "#2f4f4f" );
static readonly darkturquoise = HTMLColorParser.fromStringHexColor( "#00ced1" );
static readonly darkviolet = HTMLColorParser.fromStringHexColor( "#9400d3" );
static readonly deeppink = HTMLColorParser.fromStringHexColor( "#ff1493" );
static readonly deepskyblue = HTMLColorParser.fromStringHexColor( "#00bfff" );
static readonly dimgray = HTMLColorParser.fromStringHexColor( "#696969" );
static readonly dimgrey = HTMLColorParser.fromStringHexColor( "#696969" );
static readonly dodgerblue = HTMLColorParser.fromStringHexColor( "#1e90ff" );
static readonly firebrick = HTMLColorParser.fromStringHexColor( "#b22222" );
static readonly floralwhite = HTMLColorParser.fromStringHexColor( "#fffaf0" );
static readonly forestgreen = HTMLColorParser.fromStringHexColor( "#228b22" );
static readonly gainsboro = HTMLColorParser.fromStringHexColor( "#dcdcdc" );
static readonly ghostwhite = HTMLColorParser.fromStringHexColor( "#f8f8ff" );
static readonly gold = HTMLColorParser.fromStringHexColor( "#ffd700" );
static readonly goldenrod = HTMLColorParser.fromStringHexColor( "#daa520" );
static readonly greenyellow = HTMLColorParser.fromStringHexColor( "#adff2f" );
static readonly grey = HTMLColorParser.fromStringHexColor( "#808080" );
static readonly honeydew = HTMLColorParser.fromStringHexColor( "#f0fff0" );
static readonly hotpink = HTMLColorParser.fromStringHexColor( "#ff69b4" );
static readonly indianred = HTMLColorParser.fromStringHexColor( "#cd5c5c" );
static readonly indigo = HTMLColorParser.fromStringHexColor( "#4b0082" );
static readonly ivory = HTMLColorParser.fromStringHexColor( "#fffff0" );
static readonly khaki = HTMLColorParser.fromStringHexColor( "#f0e68c" );
static readonly lavender = HTMLColorParser.fromStringHexColor( "#e6e6fa" );
static readonly lavenderblush = HTMLColorParser.fromStringHexColor( "#fff0f5" );
static readonly lawngreen = HTMLColorParser.fromStringHexColor( "#7cfc00" );
static readonly lemonchiffon = HTMLColorParser.fromStringHexColor( "#fffacd" );
static readonly lightblue = HTMLColorParser.fromStringHexColor( "#add8e6" );
static readonly lightcoral = HTMLColorParser.fromStringHexColor( "#f08080" );
static readonly lightcyan = HTMLColorParser.fromStringHexColor( "#e0ffff" );
static readonly lightgoldenrodyellow = HTMLColorParser.fromStringHexColor( "#fafad2" );
static readonly lightgray = HTMLColorParser.fromStringHexColor( "#d3d3d3" );
static readonly lightgreen = HTMLColorParser.fromStringHexColor( "#90ee90" );
static readonly lightgrey = HTMLColorParser.fromStringHexColor( "#d3d3d3" );
static readonly lightpink = HTMLColorParser.fromStringHexColor( "#ffb6c1" );
static readonly lightsalmon = HTMLColorParser.fromStringHexColor( "#ffa07a" );
static readonly lightseagreen = HTMLColorParser.fromStringHexColor( "#20b2aa" );
static readonly lightskyblue = HTMLColorParser.fromStringHexColor( "#87cefa" );
static readonly lightslategray = HTMLColorParser.fromStringHexColor( "#778899" );
static readonly lightslategrey = HTMLColorParser.fromStringHexColor( "#778899" );
static readonly lightsteelblue = HTMLColorParser.fromStringHexColor( "#b0c4de" );
static readonly lightyellow = HTMLColorParser.fromStringHexColor( "#ffffe0" );
static readonly limegreen = HTMLColorParser.fromStringHexColor( "#32cd32" );
static readonly linen = HTMLColorParser.fromStringHexColor( "#faf0e6" );
static readonly magenta = HTMLColorParser.fromStringHexColor( "#ff00ff" );
static readonly mediumaquamarine = HTMLColorParser.fromStringHexColor( "#66cdaa" );
static readonly mediumblue = HTMLColorParser.fromStringHexColor( "#0000cd" );
static readonly mediumorchid = HTMLColorParser.fromStringHexColor( "#ba55d3" );
static readonly mediumpurple = HTMLColorParser.fromStringHexColor( "#9370db" );
static readonly mediumseagreen = HTMLColorParser.fromStringHexColor( "#3cb371" );
static readonly mediumslateblue = HTMLColorParser.fromStringHexColor( "#7b68ee" );
static readonly mediumspringgreen = HTMLColorParser.fromStringHexColor( "#00fa9a" );
static readonly mediumturquoise = HTMLColorParser.fromStringHexColor( "#48d1cc" );
static readonly mediumvioletred = HTMLColorParser.fromStringHexColor( "#c71585" );
static readonly midnightblue = HTMLColorParser.fromStringHexColor( "#191970" );
static readonly mintcream = HTMLColorParser.fromStringHexColor( "#f5fffa" );
static readonly mistyrose = HTMLColorParser.fromStringHexColor( "#ffe4e1" );
static readonly moccasin = HTMLColorParser.fromStringHexColor( "#ffe4b5" );
static readonly navajowhite = HTMLColorParser.fromStringHexColor( "#ffdead" );
static readonly oldlace = HTMLColorParser.fromStringHexColor( "#fdf5e6" );
static readonly olivedrab = HTMLColorParser.fromStringHexColor( "#6b8e23" );
static readonly orangered = HTMLColorParser.fromStringHexColor( "#ff4500" );
static readonly orchid = HTMLColorParser.fromStringHexColor( "#da70d6" );
static readonly palegoldenrod = HTMLColorParser.fromStringHexColor( "#eee8aa" );
static readonly palegreen = HTMLColorParser.fromStringHexColor( "#98fb98" );
static readonly paleturquoise = HTMLColorParser.fromStringHexColor( "#afeeee" );
static readonly palevioletred = HTMLColorParser.fromStringHexColor( "#db7093" );
static readonly papayawhip = HTMLColorParser.fromStringHexColor( "#ffefd5" );
static readonly peachpuff = HTMLColorParser.fromStringHexColor( "#ffdab9" );
static readonly peru = HTMLColorParser.fromStringHexColor( "#cd853f" );
static readonly pink = HTMLColorParser.fromStringHexColor( "#ffc0cb" );
static readonly plum = HTMLColorParser.fromStringHexColor( "#dda0dd" );
static readonly powderblue = HTMLColorParser.fromStringHexColor( "#b0e0e6" );
static readonly rosybrown = HTMLColorParser.fromStringHexColor( "#bc8f8f" );
static readonly royalblue = HTMLColorParser.fromStringHexColor( "#4169e1" );
static readonly saddlebrown = HTMLColorParser.fromStringHexColor( "#8b4513" );
static readonly salmon = HTMLColorParser.fromStringHexColor( "#fa8072" );
static readonly sandybrown = HTMLColorParser.fromStringHexColor( "#f4a460" );
static readonly seagreen = HTMLColorParser.fromStringHexColor( "#2e8b57" );
static readonly seashell = HTMLColorParser.fromStringHexColor( "#fff5ee" );
static readonly sienna = HTMLColorParser.fromStringHexColor( "#a0522d" );
static readonly skyblue = HTMLColorParser.fromStringHexColor( "#87ceeb" );
static readonly slateblue = HTMLColorParser.fromStringHexColor( "#6a5acd" );
static readonly slategray = HTMLColorParser.fromStringHexColor( "#708090" );
static readonly slategrey = HTMLColorParser.fromStringHexColor( "#708090" );
static readonly snow = HTMLColorParser.fromStringHexColor( "#fffafa" );
static readonly springgreen = HTMLColorParser.fromStringHexColor( "#00ff7f" );
static readonly steelblue = HTMLColorParser.fromStringHexColor( "#4682b4" );
static readonly tan = HTMLColorParser.fromStringHexColor( "#d2b48c" );
static readonly thistle = HTMLColorParser.fromStringHexColor( "#d8bfd8" );
static readonly tomato = HTMLColorParser.fromStringHexColor( "#ff6347" );
static readonly turquoise = HTMLColorParser.fromStringHexColor( "#40e0d0" );
static readonly violet = HTMLColorParser.fromStringHexColor( "#ee82ee" );
static readonly wheat = HTMLColorParser.fromStringHexColor( "#f5deb3" );
static readonly whitesmoke = HTMLColorParser.fromStringHexColor( "#f5f5f5" );
static readonly yellowgreen = HTMLColorParser.fromStringHexColor( "#9acd32" );
static readonly rebeccapurple = HTMLColorParser.fromStringHexColor( "#663399" );
}