Toggle menu
875
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 02:24, 9 August 2018 by Administrator (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

  • bool Contains(object element "Element to check for") - Return true if the array contains the element using the normal equal operator.
  • array Except(array elements "Elements to remove") - Return all elements that does not exist in the other collection.
  • object First(Function selector "A function to test each element for a condition.") - Returns the first element in a sequence that satisfies a specified condition.
  • object FirstOrDefault(Function selector "A function to test each element for a condition.") - Returns the first element in a sequence that satisfies a specified condition or empty if not found.
  • int Frequency(number number "The number to search for") - Counts the number of times a given Number object exists in the Array. Can only use if all the elements are of type Number
  • object this[] { get; }(int index "Index") - Backward-compatible indexer
  • bool IsCharacterArray() - check if array is an array of characters
  • bool IsNumericArray() - check if array is an array of integer numbers
  • bool IsStringArray() - check if array is an array of string
  • array OrderBy(Function comparer "Function that compares two objects of the same type. Must return a signed integer that indicates the relative values of first param A and second param B. Value Less than 0 : A is less than B.Value 0 : A equals B.Value Greater than 0 : A is greater than B.It can also be a function that takes 1 parameter and returns a string or number.") - Sorts the elements of a sequence in ascending order by using a specified comparer.
  • Empty Randomize() - Randomize the order of the elements in the current array.
  • array Select(Function selector "A transform function to apply to each element.") - Projects each element of a sequence into a new form.
  • array SelectMany(Function selector "A transform function to get each sub array.") - Projects each array element of a sequence into a new form.
  • Empty this[] { set; }(int index "Index", object value "Value to set") - Backward-compatible indexer
  • array Skip(int n "How many elements to skip") - Get all but the n first elements.
  • array Take(int n "How many elements to take") - Get the n first elements.
  • Dictionary ToDictionary(Function keySelector "A transform function to get the key of each element.") - Return a dictionary with the elements of the array.
  • Dictionary ToDictionary(Function keySelector "A transform function to get the key of each element.", Function valueSelector "A transform function to get the value of each element.") - Return a dictionary with the elements of the array.
  • string ToString() - The string representation of the object.
  • array Where(Function predicate "A function that takes 1 parameter of the types in the array and return true/false") - Filters a sequence of values based on a predicate.

Properties

  • int Alpha { get; } - Get alpha part of color
  • number Average { get; } - Average of the objects in the Array object. Can only use if all the elements are of type Number
  • 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
  • number Max { get; } - Largest of all the objects in the Array object. Can only use if all the elements are of type Number
  • number Min { get; } - Smallest of all the objects in the Array object. Can only use if all the elements are of type Number
  • string ObjectTypeName { get; } - The name of the type of object.
  • int Red { get; } - Get red part of color
  • number Sum { get; } - Sum of all the objects in the Array object. Can only use if all the elements are of type Number
  • 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"},{});