Exit Full View

Fizzy / docs / ref / Color.md

Color

A sub-class of Paint, providing a solid color. Fizzy currently has no other sub-classes of Paint, but later versions may have gradients.

Creation

There are three constructors :

RGB( 0, 1, 0 )
RGBA( 0,1,0,1 )
WebColor( "#rrggbb" )

RGB creates fully opaque colors. The parameters are red, green, blue in the range 0..1.

RGBA has an additional alpha parameter, also in the range 0..1.

WebColor uses HTML style colors in the form #rrggbb or #rrggbbaa, where each pair is a two digit hexadecimal number.

Constants

The only named colors are BLACK, WHITE and TRANSPARENT.

Fields

NameTypeComments
RedDouble
GreenDouble
BlueDouble
AlphaDouble
OpacityDoubleAn alias for Alpha

Methods

NameParametersReturn TypeComments
brighternoneColorA brighter version of the source color (by 1 / 0.7)
darkernoneColorA darker version of the source color (by 0.7)
brighterByDoubleColorScales each of the RBG channels by the given amount. > 1 for brighter, < 1 for darker.

Methods