hsb(
HUE
,
SATURATION
,
BRIGHTNESS
,
ALPHA
)

The hsb( function creates a color by combining hue, saturation, and brightness components. See Colors.


Parameters

This function has four parameters:

hue – specifies where this color falls in the spectrum. If you are familiar with the standard Apple color picker, the hue would specify the angle of the color from the center of the wheel. This must be a number from 0 to 65535.

saturation – specifies how intense this color is. Is it a very intense deep color, or is it a soft pastel color, or somewhere in between? Again using the standard Apple color picker, the saturation would specify the distance of the color from the center of the wheel. This must be a number from 0 (black) to 65535 (full intensity).

brightness – specifies how light or dark the color is. Is the color very bright, or is it almost black? This sounds similar to saturation, but it isn’t. Imagine a blue ball under a white light. As the light gets dimmer, the hue and saturation of the color don’t change, but the brightness does. On the Apple color picker the brightness is specified by the scroll bar on the right. This must be a number from 0 (black) to 65535 (full intensity).

alpha – is the opacity component of this color. This must be a number from 0 (transparent) to 65535 (fully opaque). This parameter is optional, if ommitted, the alpha component defaults to fully opaque.


Description

This function creates a color by combining hue, saturation, and brightness components. See Colors.

The example below changes the color of any object named Border to orange.

local Orange
Orange = hsb( 3563 , 62600 , 65535 )
selectobjects objectinfo("name") = "Border"
changeobjects "color",Orange

See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now includes an optional alpha (opacity) component.