def analogous(options = {})
      size = options[:size] || 6
      slices = options[:slice_by] || 30

      hsl = @color.hsl
      part = 360 / slices
      hsl.h = ((hsl.h - (part * size >> 1)) + 720) % 360

      palette = (size - 1).times.reduce([@color]) do |arr, n|
        hsl.h = (hsl.h + part) % 360
        arr << Color.new(hsl, @color.format)
      end

      with_reformat(palette, options[:as])
    end
def analogous(options = {})
      size = options[:size] || 6
      slices = options[:slice_by] || 30

      hsl = @color.hsl
      part = 360 / slices
      hsl.h = ((hsl.h - (part * size >> 1)) + 720) % 360

      palette = (size - 1).times.reduce([@color]) do |arr, n|
        hsl.h = (hsl.h + part) % 360
        arr << Color.new(hsl, @color.format)
      end

      with_reformat(palette, options[:as])
    end
Generate an analogous palette.

 @example
   'red'.paint.palette.analogous                        #=> [red, #ff0066, #ff0033, red, #ff3300, #ff6600]
   'red'.paint.palette.analogous(as: :hex)              #=> ['#f00', '#f06', '#f03', '#f00', '#f30', '#f60']
   'red'.paint.palette.analogous(size: 3)               #=> [red, #ff001a, #ff1a00]
   'red'.paint.palette.analogous(size: 3, slice_by: 60) #=> [red, #ff000d, #ff0d00]

 @param options [Hash]
 @option options :size     [Symbol] (6) number of results to return
 @option options :slice_by [Symbol] (30)
   the angle in degrees to slice the hue circle per color
 @option options :as       [Symbol] (nil) optional format to output colors as strings
 @return [Array<Color>, Array<String>] depending on presence of `options[:as]`