module LIFX::LAN::Colors

Constants

DEFAULT_KELVIN

Public Instance Methods

random_color(hue: rand(360), saturation: rand, brightness: rand, kelvin: DEFAULT_KELVIN) click to toggle source

Helper to create a random {Color}

# File lib/lifx/lan/color.rb, line 30
def random_color(hue: rand(360), saturation: rand, brightness: rand, kelvin: DEFAULT_KELVIN)
  Color.new(hue, saturation, brightness, kelvin)
end
white(brightness: 1.0, kelvin: DEFAULT_KELVIN) click to toggle source

Helper to create a white {Color} @param brightness: [Float] Valid range: `0..1` @param kelvin: [Integer] Valid range: `2500..9000` @return [Color]

# File lib/lifx/lan/color.rb, line 25
def white(brightness: 1.0, kelvin: DEFAULT_KELVIN)
  Color.new(0, 0, brightness, kelvin)
end