Module beamui.graphics.colors
Color type and useful color related operations.
Import line
import beamui.graphics.colors;
Functions
Name | Description |
blendAlpha(a1, a2)
|
Blend two alpha values in [0, 255] range (0 - fully transparent, 255 - fully opaque)
|
blendARGB(dst, src, alpha)
|
Blend two ARGB8 pixels and overwrite dst
|
blendGray(dst, src, alpha)
|
Blend two grayscale pixels using alpha
|
blendSubpixel(dst, src, alpha, x0, mode)
|
Blend subpixel using alpha
|
decodeHexColor(s)
|
Decode color string in one of formats: #RGB #ARGB #RRGGBB #AARRGGBB
|
decodeTextColor(s)
|
Decode a table color (lowercase, without underscores), none , or transparent
|
makeRGBA(r, g, b, a)
|
Make hex color from 4 components
|
opacityToAlpha(a)
|
Convert opacity [0, 1] color to [0, 255] alpha color (0 - fully transparent, 255 - fully opaque)
|
Structs
Name | Description |
Color
|
Represents RGBA color with one byte per channel
|
ColorF
|
Represents RGBA color with floating point channels in [0, 1] range
|
Aliases
Name | Type | Description |
ARGB8
|
uint
|
|