Skip to content

profburke/colorswatches

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Colorswatches

Colorswatches was created circa 2005 when I was using Plua to develop software for Palm OS devices. I resurrected it recently (summer 2014) because I needed something similar while developing the blink library for Lua.

If I really wanted to beat a dead horse, there are a number of other color collections I could implement such as the ones at Rapid Tables, or the list of Crayola colors.

Usage

colors = require 'colorswatches'
c = colors.red -- or colors['red']
print(c.name, c.r, c.g, c.b)
print(c) -- make use of Color's __tostring
print(c:rgb()) -- rgb() returns multiple values

myred = colors.new('AwesomeRed', 240, 12, 14)

This project uses semantic versioning. See semver.org for more information.

Requirements and Installation

The library was developed and tested using Lua 5.2.3. However it should run on other versions of Lua with little or no modification.

If you have downloaded the github repository, you can install the library by copying the files in the src subdirectory to your Lua library (/usr/local/share/lua/5.2 or similar). Alternatively, you can install it via luarocks

luarocks install colorswatches

Documentation and Contact Information

More documentation (than this dirt simple library requires) can be found in the doc subdirectory.

The best way to contact me regarding this library is to post an issue at the github repository.

License

Colorswatches is free software distributed under the terms of the MIT license. It may be used for any purpose, including commercial purposes, at absolutely no cost without having to ask us. The only requirement is that if you do use Colorswatches, then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation. For details, see LICENSE.

About

A simple Lua module providing a collection of color values.

Resources

License

Stars

Watchers

Forks

Packages

No packages published