new_colorref

CColorRef Class


The CColorRef class encapsulates an RGB color triplet and provides methods for manipulating the values.

Usage

Construction

Object = new_colorref()

Object = CColorRef:new()

Destruction

Object:delete()

Properties

The properties in the table below are accessed directly, without using any methods.

R

The red channel value in the range 0 through 255.

G

The green channel value in the range 0 through 255.

B

The blue channel value in the range 0 through 255.

Creation - Non-class Functions

This function is normally used to create a new CColorRef object as an alternative to the class-based new method.

new_colorref

Creates a new instance of a CColorRef object.

Construction and Destruction - Class Methods

new

Creates a new instance of a CColorRef object. Various constructors are available.

delete

Deletes the instance of the CColorRef object.

Operations

Choose

Opens the Windows ChooseColor tool for changing the color value.

ChoosePal

Opens the Windows ChooseColor tool in "open" mode showing the color palette.

Invert

Inverts the R, G, and B values to form a complementary color.

ToGray

Converts the RGB triplet to a single gray value.

Data Member Access

Get

Returns the R, G, and B values.

Set

Assigns values to the R, G, and B members.

Related Topics

Script Classes

 


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.