https://github.com/dmccuskey/dmc-kolor
Fancy color handling for Corona SDK
https://github.com/dmccuskey/dmc-kolor
Last synced: over 1 year ago
JSON representation
Fancy color handling for Corona SDK
- Host: GitHub
- URL: https://github.com/dmccuskey/dmc-kolor
- Owner: dmccuskey
- License: mit
- Created: 2015-02-07T07:49:30.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-08T08:35:40.000Z (about 11 years ago)
- Last Synced: 2025-05-07T13:58:24.513Z (over 1 year ago)
- Language: Lua
- Size: 211 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Module dmc_kolor ###
`dmc_kolor` is a Lua module which brings back the traditional ways of describing colors using RGBA values ( eg, 255, 180, 34 ) instead of the new way using percentage values (eg, 1, .5, .25 ) brought about by the change to Graphics 2.0.
It also gives additional functionality like the ability to use names when setting object colors like "Aqua" or "Red". The module even includes color tables for all of the X11 color definitions.
#### Reasons to use dmc_kolor ####
Here are some of the reasons why you would use this module:
* **Your existing code will still work**
This is perhaps the biggest win because older projects will still work and don't need to be re-written, even long after Corona Labs discontinues the V1 Compatibility Flag.
* **You don't think in HDR**
There are those who don't think in percentages and don't want to start, even for new projects. The library allows them to continue describing colors using traditional RGBA values.
* **You still get all of the new Corona Graphics 2.0 features**
There's no need to turn on the V1 Compatibility Flag, so the engine is using all of the new features. Even with dmc_kolor all of the new HDR functionalty is still available to you.
* **You don't need the extra color space**
Part of the move was to allow the engine to start supporting more than 8 bits per color channel. For a lot of applications this is overkill and unnecessary so the switch to HDR is pointless.
* **You get more functionality**
There is more functionality built in, like being able to used named colors, hex colors, mixing RGB and HDR if necessary, etc.
#### Examples ####
There are examples in the folder `dmc_kolor/examples/` which show different ways to use the `dmc_kolor` library.
#### Documentation ####
http://docs.davidmccuskey.com/display/docs/dmc_kolor.lua