Color getByRGB

From Catglobe Wiki
Jump to: navigation, search



Color_getByRGB

This function creates a color object that can be used in some of the other chart style setting functions.

Syntax

Color_getByRGB(number1, number2, number3)

Color_getByRGB(“hexadecimal”)

Arguments

number1, number2, number3: numbers (from 0 to 255) for red color, green color and blue color.

hexadecimal: is a hexadecimal value describing a color (a string).

Return type

Returns the following array

Constant

Type

Initial/Default value

Description

OBJECT_TYPE

Number

17

Enumeration for the type of object.

COLOR_RED

Number

As set in function

Color code between 0 and 255

COLOR_GREEN

Number

As set in function

Color code between 0 and 255

COLOR_BLUE

Number

As set in function

Color code between 0 and 255

Examples

array color1 = Color_getByRGB(255, 255, 0); // Yellow

array color2 = Color_getByRGB(“#000000”); // Black

Note Note: This function should be paired with function DiagramFontStyle, DiagramFillStyle

Availability

Version 5.8.1