SketchUp C API
|
Stores a RGBA color with 8 bit channels. More...
#include <SketchUpAPI/color.h>
Data Fields | |
SUByte | red |
Red color channel. | |
SUByte | green |
Green color channel. | |
SUByte | blue |
Blue color channel. | |
SUByte | alpha |
Alpha color channel. | |
Related Functions | |
(Note that these are not member functions.) | |
enum SUResult | SUColorBlend (const SUColor color1, const SUColor color2, const double weight, SUColor *blended_color) |
The blend method is used to blend two colors. The blended color will be the result of taking (1 - weight) * sucolor1 + weight * sucolor2. More... | |
enum SUResult | SUColorGetNumNames (size_t *size) |
Retrieves the number of color names recognized by SketchUp. More... | |
enum SUResult | SUColorGetNames (SUStringRef names[], const size_t size) |
Retrives all the color names recognized by SketchUp. More... | |
enum SUResult | SUColorSetByName (SUColor *color, const char *name) |
Sets the color represented by the name. More... | |
enum SUResult | SUColorSetByValue (SUColor *color, const size_t value) |
Sets the color with the provided value. The passed in value can either be integer or hexadecimal. Alpha will always be 255 but RGB. For example: if the value is 0x66ccff, rgb will be (102, 204, 255) respectively. More... | |
Stores a RGBA color with 8 bit channels.
|
related |
The blend method is used to blend two colors. The blended color will be the result of taking (1 - weight) * sucolor1 + weight * sucolor2.
[in] | color1 | A SUColor to blend color2 with. |
[in] | color2 | A SUColor to blend color1 with. |
[in] | weight | A value that determines the weight |
[out] | blended_color | The blended SUColor. |
|
related |
Retrives all the color names recognized by SketchUp.
[out] | names | An array of all the SketchUp Color names. |
[in] | size | The size of the array. |
|
related |
Retrieves the number of color names recognized by SketchUp.
[out] | size | The number of color names. |
Sets the color represented by the name.
[out] | color | The struct representing the color. |
[in] | name | The string representing the color. |
Sets the color with the provided value. The passed in value can either be integer or hexadecimal. Alpha will always be 255 but RGB. For example: if the value is 0x66ccff, rgb will be (102, 204, 255) respectively.
[out] | color | The struct representing the color. |
[in] | value | A value that represents the color. |