Color class
Revision as of 10:54, 23 July 2018 by Nguyenduyan (talk | contribs)
Color
Represents a color.
Constructors
- (string value "Value of color", bool ishtmlHex "If true, parse as html style hex, otherwise parse as system named color") - Create color from name
- (Color color "Base color", int alpha "Alpha part") - Create alpha color from existing color
- (int red "Red part", int green "Green part", int blue "Blue part") - Create color from rgb
- (int red "Red part", int green "Green part", int blue "Blue part", int alpha "Alpha part") - Create color from rgb
Methods
- object this[] { get; }(int index "Index") - Backward-compatible indexer
- Empty this[] { set; }(int index "Index", object value "Value to set") - Backward-compatible indexer
- string ToString() - The string representation of the object.
Properties
- int Alpha { get; } - Get alpha part of color
- int Blue { get; } - Get blue part of color
- int Green { get; } - Get green part of color
- string HtmlRgbaHex { get; } - Get the #xxxxxxxx html encoding of colors
- string HtmlRgbHex { get; } - Get the #xxxxxx html encoding of colors
- string ObjectTypeName { get; } - The name of the type of object.
- int Red { get; } - Get red part of color
- TypeInformation TypeInformation { get; } - Get information about this class.
Static Methods
- Color Color_getByName(string name "System color name") - Create new color object
- Color Color_getByRGB(string htmlhex "html encoded color") - Create new color object
- Color Color_getByRGB(int red "Red part", int green "Green part", int blue "Blue part") - Create new color object
(See more at Color_getByName and Color_getByRGB)
Examples
Color color = new Color (255,0,0);
print(color.Alpha);//255
print(color.Red);//255
print(color.Blue);//0
print(color.Green);//0
print(color.HtmlRgbaHex);//#ffff0000
print(color.HtmlRgbHex );//#ff0000
DCS_use(15636575);
TabulationBorder border = new TabulationBorder ("Top,Bottom,Left,Right", 1, "Solid", color);
Tabulation_setTableDiagramStyle(TableDiagram_AllTable,TABLE_DIAGRAM_STYLE_BORDER_STYLE,border);
createCrossDiagram({"Gender"},{});