Created HtmlColor object API (markdown)

Michael Miller
2016-03-06 09:43:25 -08:00
parent 26464ffa49
commit ca86b3c850

28
HtmlColor-object-API.md Normal file

@@ -0,0 +1,28 @@
HtmlColor represents a color object that uses the Html color value standard that is represented by a single uint32_t. The primary use of this class is to convert to other color objects.
Below is an example that will create a RgbColor with the Html color value for yellow.
```
RgbColor yellow( HtmlColor( 0xffff00 ) );
```
## Properties
There is one property that represents the coded component values Red, Green, and Blue. The values range from 0 to 0xffffff. Black would 0 and white would be 0xffffff.
This value is three coded bytes of red, green, blue component values. The value 0xff7f10 decoded is red = 255 (0xff), green = 127 (x7f), and blue = 16 (0x10).
```
uint32_t Color;
```
## Constructors
### HtmlColor(uint32_t color) :
Constructs a HtmlColor using the given value.
### HtmlColor(RgbColor color);
Construct a HtmlColor using a RgbColor , converting the Rgb component values to the single Html value.
### HtmlColor()
Construct a HtmlColor that will have its values set in latter operations.
CAUTION: The Color member is not initialized and may not be consistent until set.
## Methods
(none)