Class: ProfileColor

Inherits:
Object
  • Object
show all
Defined in:
app/models/profile_color.rb

Class Method Summary collapse

Class Method Details

.random_mediumObject



2
3
4
5
6
7
8
9
# File 'app/models/profile_color.rb', line 2

def self.random_medium
  # Generate a random HSL color within medium ranges
  hue = rand(0..360)                  # Any hue from the color spectrum
  saturation = rand(40..85)           # Medium saturation (not dull or neon)
  lightness = rand(35..65)            # Medium brightness (not too dark or too bright)

  hsl_to_hex(hue, saturation, lightness)
end