lue - a color manager with hue effects!

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

lue - a color manager with hue effects!

Post by Ulydev »

Hello!

I'm wrapping up some tools I've been using in my games as libraries so everyone can use them.

Here's lue, a hue manager that lets you quickly set up disco aesthetics :nyu:

Image

Code: Select all

local lue = require "lue"

lue:setColor("my-color", {200, 200, 200})

function love.update(dt)
  lue:update(dt)
end

function love.draw()
  love.graphics.setColor(lue:getColor("my-color"))
  love.graphics.rectangle("fill", 140, 120, 40, 40)
end
https://github.com/Ulydev/lue
Last edited by Ulydev on Mon Jun 27, 2016 12:26 pm, edited 2 times in total.
Hackz101
Prole
Posts: 4
Joined: Sat Mar 12, 2016 6:44 pm

Re: lue - add color effects to your games!

Post by Hackz101 »

I like the style! It's very unique and surely would help give more catchy graphics to my games.
User avatar
Tanner
Party member
Posts: 166
Joined: Tue Apr 10, 2012 1:51 am

Re: lue - add color effects to your games!

Post by Tanner »

Looks good! There's a typo in the readme, though. "lem" should be "lue", I presume.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: lue - add color effects to your games!

Post by Ranguna259 »

I belive you could replace the lue:update function with this:

Code: Select all

self.hue = (self.hue-1)%255+1 
I'm not sure though, you should test it out.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

Re: lue - add color effects to your games!

Post by Ulydev »

Hello!

I've added some new features to lue. It can now be used as a real color manager.

The old lue:getColor function has been renamed to lue:getHueColor, because now getting a color doesn't necessarily mean hue.

Indeed, you can now create a new color with

Code: Select all

lue:setColor("my-color", {255, 255, 255})
and then, for example, fade it out with

Code: Select all

lue:setColor("my-color", { color = {255, 255, 255, 0}, speed = 5 })
That's one of the features that have been added. I recommend you read the README on Github to understand all the changes.

Thanks!
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests