To use loveCC you simply have to require it like this-The library is available at github, make your contributions (anyone can contribute)
https://github.com/YoungNeer/lovelib/tree/master/lovecc
Code: Select all
lovecc=require 'lovecc'
Code: Select all
love.graphics.setColor(1,0,0)
But the way you'd do the same using lovecc is-
Code: Select all
lovecc:setColor('red')
So the way you would do that USING lovecc is:
Code: Select all
love.graphics.setColor(lovecc:getHex('ffd700'))
And if you want to change the opacity then you can use setOpacity function,
Code: Select all
lovecc:setOpacity(a)
Code: Select all
lovecc:setColor(colorname,opacity)
lovecc:setBackgroundColor(colorname,opacity)
lovecc:setParticleColors(particle,...)
Code: Select all
lovecc:newColor(colorname,r,g,b)
lovecc:newColor(colorname,hex)
Lastly let's talk about two new functions that has been added in the latest version of loveCC:-
Code: Select all
lovecc:invert(colorname,opacity)
--inverts the given color and sets opacity to given value (or 1 if nil)
lovecc:invert(opacity)
--inverts the current color and sets opacity to given value (or 1 if nil)
Please check out the github link for the library with the FULL DOCUMENTATION
Also note that Color-Picker is not discussed in this topic! It is discussed here ().