mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-06 20:34:27 +02:00
Normalize API document styling
@@ -15,9 +15,11 @@ uint32_t Color;
|
||||
|
||||
### HtmlColor(uint32_t color) :
|
||||
Constructs a HtmlColor using the given value.
|
||||
> * _color_ - a 24-bit value stored within a uint32_t in RGB order.
|
||||
|
||||
### HtmlColor(RgbColor color);
|
||||
Construct a HtmlColor using a RgbColor , converting the Rgb component values to the single Html value.
|
||||
> * _color_ - a RgbColor object.
|
||||
|
||||
### HtmlColor()
|
||||
Construct a HtmlColor that will have its values set in latter operations.
|
||||
@@ -26,20 +28,20 @@ CAUTION: The Color member is not initialized and may not be consistent until se
|
||||
## Methods
|
||||
### static HtmlColor BilinearBlend(HtmlColor c00, HtmlColor c01, HtmlColor c10, HtmlColor c11, float x, float y);
|
||||
This will blend between four colors by the amount defined by 2d weighting values.
|
||||
c00 - upper left quadrant color
|
||||
c01 - upper right quadrant color
|
||||
c10 - lower left quadrant color
|
||||
c11 - lower right quadrant color
|
||||
x - unit value (0.0 - 1.0) that defines the blend progress in horizontal space
|
||||
y - unit value (0.0 - 1.0) that defines the blend progress in vertical space
|
||||
> * _c00_ - upper left quadrant color.
|
||||
> * _c01_ - upper right quadrant color.
|
||||
> * _c10_ - lower left quadrant color.
|
||||
> * _c11_ - lower right quadrant color.
|
||||
> * _x_ - unit value (0.0 - 1.0) that defines the blend progress in horizontal space.
|
||||
> * _y_ - unit value (0.0 - 1.0) that defines the blend progress in vertical space.
|
||||
|
||||
### template \<typename T_HTMLCOLORNAMES\> size_t Parse(const char* name, size_t nameSize);
|
||||
This will parse the given string and set the color based on the value. The string is expected to be in a HTML4/CSS3 supported format.
|
||||
|
||||
T_HTMLCOLORNAMES - a HtmlColorName object (either HtmlColorNames or HtmlShortColorNames) that defines the collection of color names to use. HtmlColorNames will consume more program space as it contains the full set of standard names.
|
||||
name - the string to parse, ending at either null terminated, non-alphanumeric delimited, or nameSize count.
|
||||
nameSize - the size of the name buffer, max number of chars to parse.
|
||||
returns - the count of chars parsed (excludes null terminator). Add this to name to get the next char after the parsed value.
|
||||
> * _name_ - the string to parse, ending at either null terminated, non-alphanumeric delimited, or nameSize count.
|
||||
> * _nameSize_ - the size of the name buffer, max number of chars to parse.
|
||||
> * _\<returns\>_ - the count of chars parsed (excludes null terminator). Add this to name to get the next char after the parsed value.
|
||||
example:
|
||||
```
|
||||
HtmlColor color;
|
||||
@@ -56,9 +58,9 @@ Alternative to Parse above, takes a standard String object instead.
|
||||
This will convert the color value to a standard HTML/CSS3 color string. If a standard friendly name is available it will use it; otherwise it will provide a numerical "#hhhhhh" formatted string.
|
||||
|
||||
T_HTMLCOLORNAMES - a HtmlColorName object (either HtmlColorNames or HtmlShortColorNames) that defines the collection of color names to use. HtmlColorNames will consume more program space as it contains the full set of standard names.
|
||||
buf - the buffer to write the string into.
|
||||
bufSize - the size of the buf, room must be provided for a null terminator.
|
||||
returns - the number of chars written into the buffer.
|
||||
> * _buf_ - the buffer to write the string into.
|
||||
> * _bufSize_ - the size of the buf, room must be provided for a null terminator.
|
||||
> * _\<returns\>_ - the number of chars written into the buffer.
|
||||
|
||||
example:
|
||||
```
|
||||
@@ -68,6 +70,6 @@ example:
|
||||
|
||||
### size_t ToNumericalString(char* buf, size_t bufSize) const;
|
||||
This will convert the color value to a standard HTML/CSS3 color string. It will always provide a numerical "#hhhhhh" formatted string.
|
||||
buf - the buffer to write the string into.
|
||||
bufSize - the size of the buf, room must be provided for a null terminator.
|
||||
returns - the number of chars written into the buffer.
|
||||
> * _buf_ - the buffer to write the string into.
|
||||
> * _bufSize_ - the size of the buf, room must be provided for a null terminator.
|
||||
> * _\<returns\>_ - the number of chars written into the buffer.
|
||||
|
Reference in New Issue
Block a user