struct RGBA
pub struct RGBA {
pub r int
pub g int
pub b int
pub a int
}Purpose
Structure encapsulating r, g, b, a.
Public fields
rint- rune (Unicode code point)
gint- field (int)
bint- field (int)
aint- field (int)
#image/colorColor types and channel conversion.
struct RGBApub struct RGBA {
pub r int
pub g int
pub b int
pub a int
}Structure encapsulating r, g, b, a.
r intg intb inta intstruct NRGBApub struct NRGBA {
pub r int
pub g int
pub b int
pub a int
}Structure encapsulating r, g, b, a.
r intg intb inta intstruct Graypub struct Gray {
pub y int
}Structure encapsulating y.
y intstruct Alphapub struct Alpha {
pub a int
}Structure encapsulating a.
a intstruct YCbCrpub struct YCbCr {
pub y int
pub cb int
pub cr int
}Structure encapsulating y, cb, cr.
y intcb intcr intstruct CMYKpub struct CMYK {
pub c int
pub m int
pub y int
pub k int
}Structure encapsulating c, m, y, k.
c intm inty intk intstruct RGBA16pub struct RGBA16 {
pub r int
pub g int
pub b int
pub a int
}Structure encapsulating r, g, b, a.
r intg intb inta intrgba8pub fn rgba8(r int, g int, b int, a int) RGBAExecute rgba8.
r intg intb inta intRGBA — a value of this type
nrgba8pub fn nrgba8(r int, g int, b int, a int) NRGBAExecute nrgba8.
r intg intb inta intNRGBA — a value of this type
gray8pub fn gray8(y int) GrayExecute gray8.
y intGray — a value of this type
alpha8pub fn alpha8(a int) AlphaExecute alpha8.
a intAlpha — a value of this type
(RGBA) rgbapub fn (c RGBA) rgba() RGBA16Return the corresponding 32-bit RGBA color channels.
c RGBARGBA instance used by this call (value receiver).RGBA16 — a value of this type
(NRGBA) rgbapub fn (c NRGBA) rgba() RGBA16Return the corresponding 32-bit RGBA color channels.
c NRGBANRGBA instance used by this call (value receiver).RGBA16 — a value of this type
(Gray) rgbapub fn (c Gray) rgba() RGBA16Return the corresponding 32-bit RGBA color channels.
c GrayGray instance used by this call (value receiver).RGBA16 — a value of this type
(Alpha) rgbapub fn (c Alpha) rgba() RGBA16Return the corresponding 32-bit RGBA color channels.
c AlphaAlpha instance used by this call (value receiver).RGBA16 — a value of this type
rgb_to_ycbcrpub fn rgb_to_ycbcr(r int, g int, b int) YCbCrRgb to ycbcr.
r intg intb intYCbCr — a value of this type
ycbcr_to_rgbpub fn ycbcr_to_rgb(y int, cb int, cr int) RGBAYcbcr to rgb.
y intcb intcr intRGBA — a value of this type
rgb_to_cmykpub fn rgb_to_cmyk(r int, g int, b int) CMYKRgb to cmyk.
r intg intb intCMYK — a value of this type
cmyk_to_rgbpub fn cmyk_to_rgb(c int, m int, y int, k int) RGBACmyk to rgb.
c intm inty intk intRGBA — a value of this type
(CMYK) rgbapub fn (c CMYK) rgba() RGBA16Return the corresponding 32-bit RGBA color channels.
c CMYKCMYK instance used by this call (value receiver).RGBA16 — a value of this type