Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Accessing the file system

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: February 20, 2025
Also available as a single HTML file

Onetastic Macro Documentation > Functions > Color Functions > Color

Color

Creates a variable of type Color.

Syntax

Color Color(String value)

Parameters

String value

The color value. Following string values are accepted:

#rrggbb: Red, green and blue values specified in lowercase hexadecimal (0-9, a-f)

#RRGGBB: Red, green and blue values specified in uppercase hexadecimal (0-9, A-F)

Predefined color names (Expand)

Examples

$color1 = Color("yellow") $color1 == "#ffff00" // True $color2 = Color("#6A5ACD") $color2 == "#6a5acd" // True $color2 == "SlateBlue" // True $color2 == "SpringGreen" // False

Reference

Statements

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

File System Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions