Colors
PBNamedColor
Enumeration/bitset of type uint16_t: (not documented yet)
Constants
PBNamedColor_FIXED_BLACK
PBNamedColor_FIXED_BLACK = 0
(not documented yet)
PBNamedColor_FIXED_DARK_GRAY
PBNamedColor_FIXED_DARK_GRAY = 1
(not documented yet)
PBNamedColor_FIXED_GRAY
PBNamedColor_FIXED_GRAY = 2
(not documented yet)
PBNamedColor_FIXED_LIGHT_GRAY
PBNamedColor_FIXED_LIGHT_GRAY = 3
(not documented yet)
PBNamedColor_FIXED_WHITE
PBNamedColor_FIXED_WHITE = 4
(not documented yet)
PBNamedColor_FIXED_RED
PBNamedColor_FIXED_RED = 5
(not documented yet)
PBNamedColor_FIXED_YELLOW
PBNamedColor_FIXED_YELLOW = 6
(not documented yet)
PBNamedColor_FIXED_GREEN
PBNamedColor_FIXED_GREEN = 7
(not documented yet)
PBNamedColor_FIXED_CYAN
PBNamedColor_FIXED_CYAN = 8
(not documented yet)
PBNamedColor_FIXED_BLUE
PBNamedColor_FIXED_BLUE = 9
(not documented yet)
PBNamedColor_FIXED_MAGENTA
PBNamedColor_FIXED_MAGENTA = 10
(not documented yet)
PBNamedColor_ERROR_BACKGROUND
PBNamedColor_ERROR_BACKGROUND = 11
(not documented yet)
PBNamedColor_ERROR_TEXT
PBNamedColor_ERROR_TEXT = 12
(not documented yet)
PBNamedColor_WARNING_BACKGROUND
PBNamedColor_WARNING_BACKGROUND = 13
(not documented yet)
PBNamedColor_WARNING_TEXT
PBNamedColor_WARNING_TEXT = 14
(not documented yet)
PBNamedColor_SUCCESS_BACKGROUND
PBNamedColor_SUCCESS_BACKGROUND = 15
(not documented yet)
PBNamedColor_SUCCESS_TEXT
PBNamedColor_SUCCESS_TEXT = 16
(not documented yet)
PBNamedColor_HYPERLINK_TEXT
PBNamedColor_HYPERLINK_TEXT = 17
(not documented yet)
PBNamedColor_TERMINAL_BACKGROUND
PBNamedColor_TERMINAL_BACKGROUND = 18
(not documented yet)
PBNamedColor_TERMINAL_TEXT_5
PBNamedColor_TERMINAL_TEXT_5 = 19
(not documented yet)
PBNamedColor_TERMINAL_TEXT_6
PBNamedColor_TERMINAL_TEXT_6 = 20
(not documented yet)
PBNamedColor_TERMINAL_TEXT_7
PBNamedColor_TERMINAL_TEXT_7 = 21
(not documented yet)
PBNamedColor_FOCUS_RING
PBNamedColor_FOCUS_RING = 24
(not documented yet)
PBNamedColor_WINDOW_TEXT
PBNamedColor_WINDOW_TEXT = 25
(not documented yet)
PBNamedColor_BUTTON_TEXT
PBNamedColor_BUTTON_TEXT = 26
(not documented yet)
PBNamedColor_BORDER
PBNamedColor_BORDER = 27
(not documented yet)
PBNamedColor_TEXT_SELECTION
PBNamedColor_TEXT_SELECTION = 28
(not documented yet)
PBNamedColor_WINDOW_BACKGROUND
PBNamedColor_WINDOW_BACKGROUND = 29
(not documented yet)
PBNamedColor_SECOND_BACKGROUND
PBNamedColor_SECOND_BACKGROUND = 30
(not documented yet)
PBNamedColor_THIRD_BACKGROUND
PBNamedColor_THIRD_BACKGROUND = 31
(not documented yet)
PBNamedColor_POPUP_BACKGROUND
PBNamedColor_POPUP_BACKGROUND = 32
(not documented yet)
PBNamedColor_BUTTON_BACKGROUND
PBNamedColor_BUTTON_BACKGROUND = 33
(not documented yet)
PBNamedColor_SEPARATOR
PBNamedColor_SEPARATOR = 34
(not documented yet)
PBNamedColor_SECOND_TEXT
PBNamedColor_SECOND_TEXT = 35
(not documented yet)
PBNamedColor_CONTROL_TEXT
PBNamedColor_CONTROL_TEXT = 36
(not documented yet)
PBNamedColor_UNFOCUSED_TEXT_SELECTION
PBNamedColor_UNFOCUSED_TEXT_SELECTION = 37
(not documented yet)
PBNamedColor_COUNT
PBNamedColor_COUNT = 38
(not documented yet)
PBColor
Structure: (not documented yet)
Fields
colorSpace (PBColorSpaceID): (not documented yet)
_unused0 (uint8_t
): (not documented yet)
_unused1 (uint16_t
): (not documented yet)
opacity (float
): (not documented yet)
channel0 (float
): (not documented yet)
channel1 (float
): (not documented yet)
channel2 (float
): (not documented yet)
channel3 (float
): (not documented yet)
channel4 (float
): (not documented yet)
channel5 (float
): (not documented yet)
PBColorFromSRGB8
Function: Populate a PBColor structure from a SRGB value with 8 bits per channel.
Syntax (C/C++)
PBColor PBColorFromSRGB8(uint32_t argb);
Syntax (Python)
ColorFromSRGB8(argb) -> (color)
Parameters and Return Values
[in] argb (uint32_t
): A 32-bit color value in the SRGB color space. The most significant 8 bits give the opacity, the next 8 bits give the red channel value, the next 8 bits give the green channel value, and the least significant 8 bits give the blue channel value. For each channel, 0 is the minimum and 255 is the maximum.
[out] color (PBColor): A PBColor structure populated to represent the given color.
Discussion
When drawing with the PBColor, the SRGB values will be mapped to the color space of the target PBRenderSurface. The returned PBColor does not need to be deallocated or released.
Example (C/C++)
PBColor opaqueRed = PBColorFromSRGB8(0xFFFF0000);
PBColor translucentCyan = PBColorFromSRGB8(0x7F00FFFF);
See Also
PBColorFromP3F
Function: Populate a PBColor structure from a Display P3 value with a float per channel.
Syntax (C/C++)
PBColor PBColorFromP3F(float r, float g, float b, float a);
Syntax (Python)
ColorFromP3F(r, g, b, a) -> (color)
Parameters and Return Values
[in] r (float
): The red channel, from 0 to 1 inclusive.
[in] g (float
): The green channel, from 0 to 1 inclusive.
[in] b (float
): The blue channel, from 0 to 1 inclusive.
[in] a (float
): The alpha channel, from 0 (completely transparent) to 1 (completely opaque) inclusive.
[out] color (PBColor): A PBColor structure populated to represent the given color.
Discussion
When drawing with the PBColor, the Display P3 values will be mapped to the color space of the target PBRenderSurface. The returned PBColor does not need to be deallocated or released.
Example (C/C++)
PBColor opaqueRed = PBColorFromP3F(1, 0, 0, 1);
See Also
PBColorFromSRGBF
Function: Populate a PBColor structure from a SRGB value with a float per channel.
Syntax (C/C++)
PBColor PBColorFromSRGBF(float r, float g, float b, float a);
Syntax (Python)
ColorFromSRGBF(r, g, b, a) -> (color)
Parameters and Return Values
[in] r (float
): The red channel, from 0 to 1 inclusive.
[in] g (float
): The green channel, from 0 to 1 inclusive.
[in] b (float
): The blue channel, from 0 to 1 inclusive.
[in] a (float
): The alpha channel, from 0 (completely transparent) to 1 (completely opaque) inclusive.
[out] color (PBColor): A PBColor structure populated to represent the given color.
Discussion
When drawing with the PBColor, the SRGB values will be mapped to the color space of the target PBRenderSurface. The returned PBColor does not need to be deallocated or released.
Example (C/C++)
PBColor opaqueGreen = PBColorFromSRGBF(0, 1, 0, 1);
See Also
PBColorFromName
Function: Populate a PBColor structure for a specific named color.
Syntax (C/C++)
PBColor PBColorFromName(PBNamedColor namedColor);
Syntax (Python)
ColorFromName(namedColor) -> (color)
Parameters and Return Values
[in] namedColor (PBNamedColor): The constant representing the color.
[out] color (PBColor): A PBColor structure populated to represent the given color.
Discussion
Some of the named colors are determined by the currently loaded interface theme. If the interface theme changes, any colors returned by this function will automatically update. The returned PBColor does not need to be deallocated or released.
Example (C/C++)
PBColor opaqueRed = PBColorFromName(PBNamedColor_ADAPTIVE_RED);
See Also
PBColorTransparent
Function: Populate a PBColor structure so that it represents the absence of color.
Syntax (C/C++)
PBColor PBColorTransparent();
Syntax (Python)
ColorTransparent() -> (color)
Parameters and Return Values
[out] color (PBColor): A PBColor structure populated to represent a completely transparent color.
Example (C/C++)
PBDrawBox(painter, rectangle, PBColorTransparent() /* no fill */,
PBColorFromSRGB8(0xFFFF0000) /* red border */, 2, 0, 0);
See Also
PBColorConversionMode
Enumeration/bitset of type uint32_t: (not documented yet)
Constants
PBColorConversionMode_DEFAULT
PBColorConversionMode_DEFAULT = 0
(not documented yet)
PBColorConvert
Function: Convert a color from one color space to another.
Syntax (C/C++)
PBColor PBColorConvert(PBColor oldColor, PBColorSpaceID newColorSpaceID,
PBColorConversionMode mode);
Syntax (Python)
ColorConvert(oldColor, newColorSpaceID, mode) -> (newColor)
Parameters and Return Values
[in] oldColor (PBColor): The original color.
[in] newColorSpaceID (PBColorSpaceID): The new color space to convert into.
[in] mode (PBColorConversionMode): The mode of color conversion.
[out] newColor (PBColor): The new, converted color.
Discussion
The color space PBColorSpaceID_NAMED cannot be the new color space.