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

make-colorflutter sets up a fluttering (oscillating) colour based on the given two colors. It is used for oscillating alarm colors - flutter bugs.

Parameter Description
color 1 First color between which the flutter oscillates
color 2 Second color between which the flutter oscillates
transitiontime Time in seconds for one color change

Example

Example 1: Make a box which oscillates between Green and Red colors.

;; Place these into the initialization
(set! gui (make-glgui))
(set! mybox (glgui-box gui 0 0 100 100 Black))
(set! myflutter (make-colorflutter Green Red 0.5))
;; Place this one in the main loop
(glgui-widget-set! gui mybox 'color (colorflutter myflutter))    
Clone this wiki locally