#NEWLINE# def set_color( self , red , green , blue ) : #NEWLINE# #INDENT# 'Set backlight color to provided red, green, and blue values.  If PWM\n        is enabled then color components can be values from 0.0 to 1.0, otherwise\n        components should be zero for off and non-zero for on.\n        ' #NEWLINE# if self . _pwm_enabled : #NEWLINE# #INDENT# ( rdc , gdc , bdc ) = self . _rgb_to_duty_cycle ( ( red , green , blue ) ) #NEWLINE# self . _pwm . set_duty_cycle ( self . _red , rdc ) #NEWLINE# self . _pwm . set_duty_cycle ( self . _green , gdc ) #NEWLINE# self . _pwm . set_duty_cycle ( self . _blue , bdc ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _gpio . output_pins ( { #NEWLINE# #INDENT# self . _red : ( self . _blpol if red else ( not self . _blpol ) ) , #NEWLINE# self . _green : ( self . _blpol if green else ( not self . _blpol ) ) , #NEWLINE# self . _blue : ( self . _blpol if blue else ( not self . _blpol ) ) , #NEWLINE# #UNINDENT# } )