Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

Returns a color made from four components (rgb and transparency)

Parameter Description
r Red channel value (0 is black, 255 is maximum red)
g Green channel value (0 is black, 255 is maximum green)
b Blue channel value (0 is black, 255 is maximum blue)
a Alpha channel value (0 is most transparent, 255 is completely solid)

Example

Example 1: Return the color Papayawhip (255, 239, 213) with 25% transparency

> (define Papayawhip (color-rgba 255 239 213 (* 255 (- 1 0.25))))
> (color-alpha Papayawhip)
191
Clone this wiki locally