Lysa.ui  0.0
Lysa 3D Engine
ColorWheel Class Referenceabstract

Detailed Description

A disc selecting the hue and the saturation of a color. Fires OnColorChange.

Inherits from: Widget

Lua full name: lysa.ui.ColorWheel

Public Member Functions

nil set_hue_saturation (hue: number, saturation: number)
 Sets the hue in degrees and the saturation in [0.0, 1.0] in one call. More...
 
lysa.float4 displayed_color_at (hue: number, saturation: number)
 Returns the color drawn by the wheel at the given hue and saturation. More...
 
lysa.float4 from_hsv (hue: number, saturation: number, brightness: number, alpha: number|nil)
 Converts HSV(A) values to an RGBA color. More...
 
lysa.float3 to_hsv (color: lysa.float4)
 Converts an RGBA color to hue (degrees), saturation and brightness. More...
 

Properties

number hue
 The current hue, in degrees within [0.0, 360.0). (read-only)
 
number saturation
 The current saturation within [0.0, 1.0]. (read-only)
 
number brightness
 The current brightness within [0.0, 1.0].
 
number alpha
 The current alpha within [0.0, 1.0].
 
lysa.float4 color
 The current color as RGBA.
 
lysa.float2 center
 Center of the disc in widget coordinates. (read-only)
 
number radius
 Radius of the disc in virtual screen units. (read-only)
 
integer segments
 Number of angular segments used to draw the disc.
 
integer rings
 Number of concentric rings used to draw the disc.
 
number cursor_radius
 Radius of the cursor marking the selected color.
 
number cursor_border
 Border width of the cursor marking the selected color.
 

Member Function Documentation

nil set_hue_saturation ( number  hue,
number  saturation)

Sets the hue in degrees and the saturation in [0.0, 1.0] in one call.

Parameters
huenumber
saturationnumber
lysa.float4 displayed_color_at ( number  hue,
number  saturation)

Returns the color drawn by the wheel at the given hue and saturation.

Parameters
huenumber
saturationnumber
Returns
lysa.float4
lysa.float4 from_hsv ( number  hue,
number  saturation,
number  brightness,
number|nil  alpha)

Converts HSV(A) values to an RGBA color.

Parameters
huenumber
saturationnumber
brightnessnumber
alphanumber|nil
Returns
lysa.float4
lysa.float3 to_hsv ( lysa.float4  color)

Converts an RGBA color to hue (degrees), saturation and brightness.

Parameters
colorlysa.float4
Returns
lysa.float3

Property Documentation

number hue

The current hue, in degrees within [0.0, 360.0). (read-only)

number saturation

The current saturation within [0.0, 1.0]. (read-only)

number brightness

The current brightness within [0.0, 1.0].

number alpha

The current alpha within [0.0, 1.0].

lysa.float4 color

The current color as RGBA.

lysa.float2 center

Center of the disc in widget coordinates. (read-only)

number radius

Radius of the disc in virtual screen units. (read-only)

integer segments

Number of angular segments used to draw the disc.

integer rings

Number of concentric rings used to draw the disc.

number cursor_radius

Radius of the cursor marking the selected color.

number cursor_border

Border width of the cursor marking the selected color.