Public Member Functions | List of all members
Color Class Reference

Inherits ScriptObject.

Public Member Functions

 Color ()
 
 Color (Number red, Number green, Number blue)
 
 Color (Number red, Number green, Number blue, Number alpha)
 
Number getRed ()
 
Number getGreen ()
 
Number getBlue ()
 
Number getAlpha ()
 
String toString ()
 

Detailed Description

Color specified by red, green, blue, and alpha values.

Constructor & Destructor Documentation

◆ Color() [1/3]

Color ( )

Initializes a new color as opaque white.

◆ Color() [2/3]

Color ( Number  red,
Number  green,
Number  blue 
)

Initializes a new color as opaque (i.e. alpha equal to 1). All arguments are clamped to the range [0; 1].

Parameters
redRed component.
greenGreen component.
blueBlue component.

◆ Color() [3/3]

Color ( Number  red,
Number  green,
Number  blue,
Number  alpha 
)

Initializes a new color. All arguments are clamped to the range [0; 1].

Parameters
redRed component.
greenGreen component.
blueBlue component.
alphaAlpha component.

Member Function Documentation

◆ getAlpha()

Number getAlpha ( )

Returns the alpha component.

◆ getBlue()

Number getBlue ( )

Returns the blue component.

◆ getGreen()

Number getGreen ( )

Returns the green component.

◆ getRed()

Number getRed ( )

Returns the red component.

◆ toString()

String toString ( )

Converts the color to a string (e.g. [0.25, 0.25, 0.75, 1]).



Generated by Autodesk, Inc. 19 April 2024
Copyright (c) 2012-2024 by Autodesk, Inc.