module FFaker::Color
def hex_code
def hex_code format('%06x', rand * 0xffffff) end
def hsl_array
def hsl_array [random_hue_value, random_percentage_string, random_percentage_string] end
def hsl_list
def hsl_list "#{random_hue_value},#{random_percentage_string},#{random_percentage_string}" end
def hsla_array
def hsla_array [random_hue_value, random_percentage_string, random_percentage_string, random_opacity_value] end
def hsla_list
def hsla_list "#{random_hue_value},#{random_percentage_string},#{random_percentage_string},#{random_opacity_value}" end
def name
def name fetch_sample(NAMES_LIST) end
def random_hue_value
def random_hue_value rand(360) end
def random_opacity_value
def random_opacity_value rand(0.0..1.0).round(2) end
def random_percentage_string
def random_percentage_string "#{rand(100)}%" end
def random_rgb_value
def random_rgb_value rand 255 end
def rgb_array
def rgb_array [random_rgb_value, random_rgb_value, random_rgb_value] end
def rgb_list
def rgb_list "#{random_rgb_value},#{random_rgb_value},#{random_rgb_value}" end
def rgba_array
def rgba_array [random_rgb_value, random_rgb_value, random_rgb_value, random_opacity_value] end
def rgba_list
def rgba_list "#{random_rgb_value},#{random_rgb_value},#{random_rgb_value},#{random_opacity_value}" end