lib/mazes/color_space.rb
# Public: Calculate background colors by rotating hues along the color wheel as
# distance increases.
#
# cell - A Cell to query for background coloring.
# scalar - A Number that determines how many cycles of the color wheel are in
#   the longest path of the Space. Defaults to 1.25
#
# Returns a ChunkyPNG::Color or nil
Calculate background colors by rotating hues along the color wheel as
distance increases.

A Cell to query for background coloring.
scalar - A Number that determines how many cycles of the color wheel are in
the longest path of the Space.

Returns a ChunkyPNG::Color or nil
Calculate background colors by rotating hues along the color wheel as distance increases . A Cell to query for background coloring . scalar - A Number that determines how many cycles of the color wheel are in the longest path of the Space . Returns a ChunkyPNG :: Color or nil
def rotate_hue cell:, scalar: 1.25
			return nil if @distances.nil? or @distances[cell].nil?
			distance = @distances[cell]
			hue = (360 * distance * scalar / @maximum).round % 360
			sat = 1.0
			lum = 0.5
			ChunkyPNG::Color.from_hsl hue, sat, lum
		end
def rotate_hue cell : , scalar : 1.25 return nil if @distances . nil? or @distances [ cell ] . nil? distance = @distances [ cell ] hue = ( 360 * distance * scalar / @maximum ) . round % 360 sat = 1.0 lum = 0.5 ChunkyPNG :: Color . from_hsl hue , sat , lum end
Public: Calculate background colors by rotating hues along the color wheel as
distance increases.
Public : Calculate background colors by rotating hues along the color wheel as distance increases .
cell
<not_specific>
scalar
<not_specific>