ChaosPro Home
Introduction
What's New
Palettes
Using Formulas
Layering in ChaosPro
Rendering
Fractal Parameter Windows
Windows
Menu
3D Transformations
Animations
Formula Compiler
Writing Formulas
Language Reference
Introduction
Basic Syntax
Datatypes
Constants
Variables
Expressions
Operators
Functions
Arithmetic
Conversion
Color
rgb
rgba
hsl
hsla
red
green
blue
alpha
hue
sat
lum
blend
compose
gradient
merge
Trigonometric
Miscellaneous
Control Structures
Compiler Directives
Functions
Interface to ChaosPro
Special Features, Notes...
Compatibility
Fractal Type Reference
Tutorials
Appendix
CHAOSPRO 4.0
Release 4.0
.

Predefined Functions - rgba

Function name:rgba - Create color from real arguments
Synopsis:rgba(red,green,blue,alpha)

Input data type Output data type
real, real, real, real color


Description:

The function rgba(<red>,<green>,<blue>,<alpha>) returns a color which is initialized according to the four parameters passed to the function. The parameters <red>, <green>, <blue> and <alpha> should be in the range from 0 to 1. The alpha value of the color sets the transparency of the color: 0 means: color is transparent, 1 means, color is opaque.

rgba(0,0,0,1) returns an opaque black color, rgb(1,1,1,1) returns an opaque white. On initializing the color no bounds checking is done, so rgb(5,0,0,1) creates a color whose red-part is beyond the valid range. On output the value will be truncated to a correct interval (i.e. rgb(1,0,0,1). But some other functions like the merging functions do not truncate a color in any way: They then will use that value.

So it's legal to create colors whose parts are not in the valid range from 0 to 1, but you should know what you do...