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

Stores a RGBA color with 8 bit channels. More...

#include <color.h>

Data Fields

SUByte red
 Red color channel. More...
 
SUByte green
 Green color channel. More...
 
SUByte blue
 Blue color channel. More...
 
SUByte alpha
 Alpha color channel. More...
 

Related Functions

(Note that these are not member functions.)

SU_RESULT 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...
 
SU_RESULT SUColorGetNumNames (size_t *size)
 Retrieves the number of color names recognized by SketchUp. More...
 
SU_RESULT SUColorGetNames (SUStringRef names[], const size_t size)
 Retrives all the color names recognized by SketchUp. More...
 
SU_RESULT SUColorSetByName (SUColor *color, const char *name)
 Sets the color represented by the name. More...
 
SU_RESULT 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

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

Field Documentation

SUByte SUColor::alpha

Alpha color channel.

SUByte SUColor::blue

Blue color channel.

SUByte SUColor::green

Green color channel.

SUByte SUColor::red

Red color channel.


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