Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document colors #95

Merged
merged 4 commits into from
Sep 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,28 @@ Common items for the different game converters. Including parsers, OS utilities,

## Current Status
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/54be2f027eb040448b8bf89410c7ff3d)](https://www.codacy.com/gh/ParadoxGameConverters/commonItems/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ParadoxGameConverters/commonItems&utm_campaign=Badge_Grade)

## Included Items

### Color.h
Represents a Paradox-defined color.

Can be directly created in either the RGB or HSV color spaces.

Can be imported in:
* Unspecified with ints (becomes RGB) - "= { 64 128 128 }"
* Unspecified with floats (becomes RGB) - "= { 0.5 0.9 0.1 }"
* RGB - "= rgb { 64 128 128 }"
* Hex - "= hex { 408080 }"
* HSV - "= hsv { 0.5 0.5 0.5 }"
* HSV360 - "= hsv360 { 180 50 50 }"
* Name (requires caching definitions for the named colors in advance) - "= dark_moderate_cyan"

Can be output in:
* unspecified (rgb) - "= { 64 128 128 }"
* RGB - "= rgb { 64 128 128 }"
* hex - "= hex { 408080 }"
* HSV - "= hsv { 0.5 0.5 0.5 }"
* HSV360 - "= hsv360 { 180 50 50 }"

The individual components can be accessed in both RGB and HSV color spaces, equality and inequality can be checked, the color cache can be reviewed and modified, and colors can have a random fluctuation be applied automatically.