SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Fields | Related Functions
SUColor Struct Reference

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...
 

Detailed Description

Stores a RGBA color with 8 bit channels.

Friends And Related Function Documentation

enum SUResult SUColorBlend ( const SUColor  color1,
const SUColor  color2,
const double  weight,
SUColor blended_color 
)
related

The blend method is used to blend two colors. The blended color will be the result of taking (1 - weight) * sucolor1 + weight * sucolor2.

Since
SketchUp 2018, API 6.0
Parameters
[in]color1A SUColor to blend color2 with.
[in]color2A SUColor to blend color1 with.
[in]weightA value that determines the weight
[out]blended_colorThe blended SUColor.
Returns
enum SUResult SUColorGetNames ( SUStringRef  names[],
const size_t  size 
)
related

Retrives all the color names recognized by SketchUp.

Since
SketchUp 2018, API 6.0
Parameters
[out]namesAn array of all the SketchUp Color names.
[in]sizeThe size of the array.
Returns
enum SUResult SUColorGetNumNames ( size_t *  size)
related

Retrieves the number of color names recognized by SketchUp.

Since
SketchUp 2018, API 6.0
Parameters
[out]sizeThe number of color names.
Returns
enum SUResult SUColorSetByName ( SUColor color,
const char *  name 
)
related

Sets the color represented by the name.

Since
SketchUp 2018, API 6.0
Parameters
[out]colorThe struct representing the color.
[in]nameThe string representing the color.
Returns
enum SUResult SUColorSetByValue ( SUColor color,
const size_t  value 
)
related

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.

Since
SketchUp 2018, API 6.0
Parameters
[out]colorThe struct representing the color.
[in]valueA value that represents the color.
Returns

The documentation for this struct was generated from the following file: