Releases: demonnic/figinator
Greater control over colors!
This release adds two new options to figinator.getFancy for making colored figlets!
You can now control the contrastColor. This means the background color normally, and defaults to black. You can set it to a color name recognized by cecho, such as "white" or "red", or a decho designator such as "<255,255,255>" or "<128,0,0>", or an hecho one like "#FFFFFF" or "#009900". There is also a special designation called "invert" which will make the contrast color the inverse of the gradient. That is to say, if the gradient color for a space is 128,255,0 then the contrastColor would be 127,0,255 for that space.
Example of setting the contrastColor to "magenta" on a "greenbluegreen" gradient.
Example of the same gradient with the contrastColor set to "invert"
Speaking of inverting, there is also a new invert option, which when true will cause the gradient colors to be the background, and contrastColor to be the foreground.
decho(figinator.getFancy({ msg = "Boing!", invert = false, gradient = "rainbow" }))
decho("\n" .. figinator.getFancy({ msg = "Boing!", invert = true, gradient = "rainbow"}))
And finally one example showing the interplay of both options
decho(figinator.getFancy({ msg = "Boing!", invert = false, gradient = "greenbluegreen" }))
decho("\n" .. figinator.getFancy({ msg = "Boing!", invert = false, gradient = "greenbluegreen", contrastColor = "invert" }))
decho("\n" .. figinator.getFancy({ msg = "Boing!", invert = true, gradient = "greenbluegreen", contrastColor = "invert" }))
Now with pretty color gradients!
Ooooh, pretty colors
This release adds the figinator.getFancy(tableOfOptions)
function and a list of included gradients to make it easier to get started!
For a quick rundown on the formatting for the fancy stuff
figinator.getFancy(options)
- This function does it all! Including interleaving color gradients for use with decho!
- options is a table of options to apply. Valid options are:
- msg
- this one is required, and is the text to make the figlet out of
- kern
- if true, will apply kerning, reducing the space between the letters
- defaults to false
- smush
- if true, will smush the letters closer, having them share edges where possible
- defaults to false
- gradType
- use either 'h' for horizontal, or 'v' for vertical.
- defaults to 'h'
- gradient
- the actual gradient to use. Can either be a table of gradient stops to use, or the string name of an included gradient
gradient = {{50,50,50}, {255,0,0}, {50,50,50}}
- would shift from grey to red to grey
gradient = "rainbow"
- will use the included "rainbow" gradient
- msg
Examples
decho(figinator.getFancy({ msg = "Gradient1", gradient = "rainbow", smush = true }))
decho(figinator.getFancy({ msg = "Gradient2", gradient = {{255,0,0}, {0,255,0}} }))
decho(figinator.getFancy({ msg = "Gradient3", gradType = "v", kern = true, gradient = {{75,0,0}, {255,0,0}} }))
Gradient sampler
And here are all the included gradients, applied horizontally to a figlet for "Gradient"
Initial Release
First release! Includes 20 figlet fonts.
Take a look at the README for full usage. Here are some action pics using the aliases I added for playing around.