local hsluv = require 'hsluv' local G = love.graphics local function mouse_pos() -- in world space return G.inverseTransformPoint(love.mouse.getPosition()) end local function write_at(text,x,y) local tx,ty = G.transformPoint(x,y) G.push() G.origin() G.print(text,tx,ty) G.pop() end local function phi_color(n) local phi = (1+math.sqrt(5))/2 local h = (360*phi*n)%360 return hsluv.hsluv_to_rgb({h, 80, 60}) end return { mouse_pos = mouse_pos, write_at = write_at, phi_color = phi_color, }