Module color

Source
Expand description

Describe colors.

Modules§

exposed
Exposed namespace of the module.
orphan
Orphan namespace of the module.
prelude
Prelude to use essentials: use my_module::prelude::*.
protected
Protected namespace of the module.

Structs§

Abgr
An Alpha + Blue + Green + Red pixel.
Argb
An Alpha + Red + Green + Blue pixel.
Bgr
A Blue + Green + Red pixel.
Bgra
A Blue + Green + Red + Alpha pixel.
Gray
A Grayscale pixel (rgb crate v0.8)
GrayA
A Value (brightness) + Alpha pixel (rgb crate v0.9)
GrayAlpha
A pixel for grayscale value + alpha components (rgb crate v0.8)
Grb
A Green + Red + Blue pixel.
RGB
A Red + Green + Blue pixel.
RGBA
A Red + Green + Blue + Alpha pixel.
Rgb
A Red + Green + Blue pixel.
Rgba
A Red + Green + Blue + Alpha pixel.

Traits§

AsPixels
Use ::bytemuck::cast_slice() instead.
ColorComponentMap
Same as ComponentMap, but doesn’t change the alpha channel (if there’s any alpha).
ComponentBytes
Use ::bytemuck::cast_slice() instead.
ComponentMap
Applying operation to every component
ComponentSlice
Casting the struct to slices of its components
FromSlice
Use ::bytemuck::cast_slice() or ::bytemuck::from_bytes() to convert
Pod
Marker trait for “plain old data”.
RgbaInterface
Convertable into RGBA.
Zeroable
Trait for types that can be safely created with zeroed.

Type Aliases§

RGB8
8-bit RGB
RGB16
16-bit RGB in machine’s native endian
RGBA8
8-bit RGBA, alpha is last. 0 = transparent, 255 = opaque.
RGBA16
16-bit RGB in machine’s native endian. 0 = transparent, 65535 = opaque.