pub struct Bgr666(_);
Expand description

Bgr666 color.

Use the methods provided by the RgbColor trait to access individual color channels and predefined color constants.

See the module-level documentation for more information about conversion between this type and raw data.

Implementations§

source§

impl Bgr666where Self: RgbColor,

source

pub const fn new(r: u8, g: u8, b: u8) -> Self

Creates a new Bgr666 color. Too large channel values will be limited by setting the unused most significant bits to zero.

Trait Implementations§

source§

impl Clone for Bgr666

source§

fn clone(&self) -> Bgr666

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Bgr666

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Bgr666

source§

fn default() -> Bgr666

Returns the “default value” for a type. Read more
source§

impl Format for Bgr666

source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
source§

impl From<Bgr555> for Bgr666

source§

fn from(other: Bgr555) -> Self

Converts to this type from the input type.
source§

impl From<Bgr565> for Bgr666

source§

fn from(other: Bgr565) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Bgr555

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Bgr565

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Bgr888

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for BinaryColor

source§

fn from(color: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Gray2

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Gray4

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Gray8

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for RawU24

source§

fn from(color: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Rgb555

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Rgb565

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Rgb666

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr666> for Rgb888

source§

fn from(other: Bgr666) -> Self

Converts to this type from the input type.
source§

impl From<Bgr888> for Bgr666

source§

fn from(other: Bgr888) -> Self

Converts to this type from the input type.
source§

impl From<BinaryColor> for Bgr666

source§

fn from(color: BinaryColor) -> Self

Converts to this type from the input type.
source§

impl From<Gray2> for Bgr666

source§

fn from(other: Gray2) -> Self

Converts to this type from the input type.
source§

impl From<Gray4> for Bgr666

source§

fn from(other: Gray4) -> Self

Converts to this type from the input type.
source§

impl From<Gray8> for Bgr666

source§

fn from(other: Gray8) -> Self

Converts to this type from the input type.
source§

impl From<RawU24> for Bgr666

source§

fn from(data: RawU24) -> Self

Converts to this type from the input type.
source§

impl From<Rgb555> for Bgr666

source§

fn from(other: Rgb555) -> Self

Converts to this type from the input type.
source§

impl From<Rgb565> for Bgr666

source§

fn from(other: Rgb565) -> Self

Converts to this type from the input type.
source§

impl From<Rgb666> for Bgr666

source§

fn from(other: Rgb666) -> Self

Converts to this type from the input type.
source§

impl From<Rgb888> for Bgr666

source§

fn from(other: Rgb888) -> Self

Converts to this type from the input type.
source§

impl Hash for Bgr666

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Bgr666

source§

fn cmp(&self, other: &Bgr666) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Bgr666> for Bgr666

source§

fn eq(&self, other: &Bgr666) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Bgr666> for Bgr666

source§

fn partial_cmp(&self, other: &Bgr666) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PixelColor for Bgr666

§

type Raw = RawU24

Raw data type. Read more
source§

impl RgbColor for Bgr666

source§

fn r(&self) -> u8

Returns the red channel value.
source§

fn g(&self) -> u8

Returns the green channel value.
source§

fn b(&self) -> u8

Returns the blue channel value.
source§

const MAX_R: u8 = 63u8

The maximum value in the red channel.
source§

const MAX_G: u8 = 63u8

The maximum value in the green channel.
source§

const MAX_B: u8 = 63u8

The maximum value in the blue channel.
source§

const BLACK: Self = _

Black color (R: 0%, G: 0%, B: 0%)
source§

const RED: Self = _

Red color (R: 100%, G: 0%, B: 0%)
source§

const GREEN: Self = _

Green color (R: 0%, G: 100%, B: 0%)
source§

const BLUE: Self = _

Blue color (R: 0%, G: 0%, B: 100%)
source§

const YELLOW: Self = _

Yellow color (R: 100%, G: 100%, B: 0%)
source§

const MAGENTA: Self = _

Magenta color (R: 100%, G: 0%, B: 100%)
source§

const CYAN: Self = _

Cyan color (R: 0%, G: 100%, B: 100%)
source§

const WHITE: Self = _

White color (R: 100%, G: 100%, B: 100%)
source§

impl WebColors for Bgr666

Named web colors.

source§

const CSS_ALICE_BLUE: Self = _

Alice Blue

source§

const CSS_ANTIQUE_WHITE: Self = _

Antique White

source§

const CSS_AQUA: Self = _

Aqua

source§

const CSS_AQUAMARINE: Self = _

Aquamarine

source§

const CSS_AZURE: Self = _

Azure

source§

const CSS_BEIGE: Self = _

Beige

source§

const CSS_BISQUE: Self = _

Bisque

source§

const CSS_BLACK: Self = _

Black

source§

const CSS_BLANCHED_ALMOND: Self = _

Blanched Almond

source§

const CSS_BLUE: Self = _

Blue

source§

const CSS_BLUE_VIOLET: Self = _

Blue Violet

source§

const CSS_BROWN: Self = _

Brown

source§

const CSS_BURLY_WOOD: Self = _

Burly Wood

source§

const CSS_CADET_BLUE: Self = _

Cadet Blue

source§

const CSS_CHARTREUSE: Self = _

Chartreuse

source§

const CSS_CHOCOLATE: Self = _

Chocolate

source§

const CSS_CORAL: Self = _

Coral

source§

const CSS_CORNFLOWER_BLUE: Self = _

Cornflower Blue

source§

const CSS_CORNSILK: Self = _

Cornsilk

source§

const CSS_CRIMSON: Self = _

Crimson

source§

const CSS_CYAN: Self = _

Cyan

source§

const CSS_DARK_BLUE: Self = _

Dark Blue

source§

const CSS_DARK_CYAN: Self = _

Dark Cyan

source§

const CSS_DARK_GOLDENROD: Self = _

Dark Goldenrod

source§

const CSS_DARK_GRAY: Self = _

Dark Gray

source§

const CSS_DARK_GREEN: Self = _

Dark Green

source§

const CSS_DARK_KHAKI: Self = _

Dark Khaki

source§

const CSS_DARK_MAGENTA: Self = _

Dark Magenta

source§

const CSS_DARK_OLIVE_GREEN: Self = _

Dark Olive Green

source§

const CSS_DARK_ORANGE: Self = _

Dark Orange

source§

const CSS_DARK_ORCHID: Self = _

Dark Orchid

source§

const CSS_DARK_RED: Self = _

Dark Red

source§

const CSS_DARK_SALMON: Self = _

Dark Salmon

source§

const CSS_DARK_SEA_GREEN: Self = _

Dark Sea Green

source§

const CSS_DARK_SLATE_BLUE: Self = _

Dark Slate Blue

source§

const CSS_DARK_SLATE_GRAY: Self = _

Dark Slate Gray

source§

const CSS_DARK_TURQUOISE: Self = _

Dark Turquoise

source§

const CSS_DARK_VIOLET: Self = _

Dark Violet

source§

const CSS_DEEP_PINK: Self = _

Deep Pink

source§

const CSS_DEEP_SKY_BLUE: Self = _

Deep Sky Blue

source§

const CSS_DIM_GRAY: Self = _

Dim Gray

source§

const CSS_DODGER_BLUE: Self = _

Dodger Blue

source§

const CSS_FIRE_BRICK: Self = _

Fire Brick

source§

const CSS_FLORAL_WHITE: Self = _

Floral White

source§

const CSS_FOREST_GREEN: Self = _

Forest Green

source§

const CSS_FUCHSIA: Self = _

Fuchsia

source§

const CSS_GAINSBORO: Self = _

Gainsboro

source§

const CSS_GHOST_WHITE: Self = _

Ghost White

source§

const CSS_GOLD: Self = _

Gold

source§

const CSS_GOLDENROD: Self = _

Goldenrod

source§

const CSS_GRAY: Self = _

Gray

source§

const CSS_GREEN: Self = _

Green

source§

const CSS_GREEN_YELLOW: Self = _

Green Yellow

source§

const CSS_HONEYDEW: Self = _

Honeydew

source§

const CSS_HOT_PINK: Self = _

Hot Pink

source§

const CSS_INDIAN_RED: Self = _

Indian Red

source§

const CSS_INDIGO: Self = _

Indigo

source§

const CSS_IVORY: Self = _

Ivory

source§

const CSS_KHAKI: Self = _

Khaki

source§

const CSS_LAVENDER: Self = _

Lavender

source§

const CSS_LAVENDER_BLUSH: Self = _

Lavender Blush

source§

const CSS_LAWN_GREEN: Self = _

Lawn Green

source§

const CSS_LEMON_CHIFFON: Self = _

Lemon Chiffon

source§

const CSS_LIGHT_BLUE: Self = _

Light Blue

source§

const CSS_LIGHT_CORAL: Self = _

Light Coral

source§

const CSS_LIGHT_CYAN: Self = _

Light Cyan

source§

const CSS_LIGHT_GOLDENROD_YELLOW: Self = _

Light Goldenrod Yellow

source§

const CSS_LIGHT_GRAY: Self = _

Light Gray

source§

const CSS_LIGHT_GREEN: Self = _

Light Green

source§

const CSS_LIGHT_PINK: Self = _

Light Pink

source§

const CSS_LIGHT_SALMON: Self = _

Light Salmon

source§

const CSS_LIGHT_SEA_GREEN: Self = _

Light Sea Green

source§

const CSS_LIGHT_SKY_BLUE: Self = _

Light Sky Blue

source§

const CSS_LIGHT_SLATE_GRAY: Self = _

Light Slate Gray

source§

const CSS_LIGHT_STEEL_BLUE: Self = _

Light Steel Blue

source§

const CSS_LIGHT_YELLOW: Self = _

Light Yellow

source§

const CSS_LIME: Self = _

Lime

source§

const CSS_LIME_GREEN: Self = _

Lime Green

source§

const CSS_LINEN: Self = _

Linen

source§

const CSS_MAGENTA: Self = _

Magenta

source§

const CSS_MAROON: Self = _

Maroon

source§

const CSS_MEDIUM_AQUAMARINE: Self = _

Medium Aquamarine

source§

const CSS_MEDIUM_BLUE: Self = _

Medium Blue

source§

const CSS_MEDIUM_ORCHID: Self = _

Medium Orchid

source§

const CSS_MEDIUM_PURPLE: Self = _

Medium Purple

source§

const CSS_MEDIUM_SEA_GREEN: Self = _

Medium Sea Green

source§

const CSS_MEDIUM_SLATE_BLUE: Self = _

Medium Slate Blue

source§

const CSS_MEDIUM_SPRING_GREEN: Self = _

Medium Spring Green

source§

const CSS_MEDIUM_TURQUOISE: Self = _

Medium Turquoise

source§

const CSS_MEDIUM_VIOLET_RED: Self = _

Medium Violet Red

source§

const CSS_MIDNIGHT_BLUE: Self = _

Midnight Blue

source§

const CSS_MINT_CREAM: Self = _

Mint Cream

source§

const CSS_MISTY_ROSE: Self = _

Misty Rose

source§

const CSS_MOCCASIN: Self = _

Moccasin

source§

const CSS_NAVAJO_WHITE: Self = _

Navajo White

source§

const CSS_NAVY: Self = _

Navy

source§

const CSS_OLD_LACE: Self = _

Old Lace

source§

const CSS_OLIVE: Self = _

Olive

source§

const CSS_OLIVE_DRAB: Self = _

Olive Drab

source§

const CSS_ORANGE: Self = _

Orange

source§

const CSS_ORANGE_RED: Self = _

Orange Red

source§

const CSS_ORCHID: Self = _

Orchid

source§

const CSS_PALE_GOLDENROD: Self = _

Pale Goldenrod

source§

const CSS_PALE_GREEN: Self = _

Pale Green

source§

const CSS_PALE_TURQUOISE: Self = _

Pale Turquoise

source§

const CSS_PALE_VIOLET_RED: Self = _

Pale Violet Red

source§

const CSS_PAPAYA_WHIP: Self = _

Papaya Whip

source§

const CSS_PEACH_PUFF: Self = _

Peach Puff

source§

const CSS_PERU: Self = _

Peru

source§

const CSS_PINK: Self = _

Pink

source§

const CSS_PLUM: Self = _

Plum

source§

const CSS_POWDER_BLUE: Self = _

Powder Blue

source§

const CSS_PURPLE: Self = _

Purple

source§

const CSS_REBECCAPURPLE: Self = _

Rebeccapurple

source§

const CSS_RED: Self = _

Red

source§

const CSS_ROSY_BROWN: Self = _

Rosy Brown

source§

const CSS_ROYAL_BLUE: Self = _

Royal Blue

source§

const CSS_SADDLE_BROWN: Self = _

Saddle Brown

source§

const CSS_SALMON: Self = _

Salmon

source§

const CSS_SANDY_BROWN: Self = _

Sandy Brown

source§

const CSS_SEA_GREEN: Self = _

Sea Green

source§

const CSS_SEASHELL: Self = _

Seashell

source§

const CSS_SIENNA: Self = _

Sienna

source§

const CSS_SILVER: Self = _

Silver

source§

const CSS_SKY_BLUE: Self = _

Sky Blue

source§

const CSS_SLATE_BLUE: Self = _

Slate Blue

source§

const CSS_SLATE_GRAY: Self = _

Slate Gray

source§

const CSS_SNOW: Self = _

Snow

source§

const CSS_SPRING_GREEN: Self = _

Spring Green

source§

const CSS_STEEL_BLUE: Self = _

Steel Blue

source§

const CSS_TAN: Self = _

Tan

source§

const CSS_TEAL: Self = _

Teal

source§

const CSS_THISTLE: Self = _

Thistle

source§

const CSS_TOMATO: Self = _

Tomato

source§

const CSS_TURQUOISE: Self = _

Turquoise

source§

const CSS_VIOLET: Self = _

Violet

source§

const CSS_WHEAT: Self = _

Wheat

source§

const CSS_WHITE: Self = _

White

source§

const CSS_WHITE_SMOKE: Self = _

White Smoke

source§

const CSS_YELLOW: Self = _

Yellow

source§

const CSS_YELLOW_GREEN: Self = _

Yellow Green

source§

impl Copy for Bgr666

source§

impl Eq for Bgr666

source§

impl StructuralEq for Bgr666

source§

impl StructuralPartialEq for Bgr666

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dstwhere T: Cast<Dst>,

Casts the value.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dstwhere Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<C> IntoStorage for Cwhere C: PixelColor, <C as PixelColor>::Raw: From<C>,

§

type Storage = <<C as PixelColor>::Raw as RawData>::Storage

The underlying storage type for the pixel color
source§

fn into_storage(self) -> <C as IntoStorage>::Storage

Convert the PixelColor into its raw storage form
source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<C> ToBytes for Cwhere C: PixelColor + Into<<C as PixelColor>::Raw>,

§

type Bytes = <<C as PixelColor>::Raw as ToBytes>::Bytes

Return type of methods in this trait.
source§

fn to_le_bytes(self) -> <C as ToBytes>::Bytes

Converts a color into a byte array with little endian byte order.
source§

fn to_be_bytes(self) -> <C as ToBytes>::Bytes

Converts a color into a byte array with big endian byte order.
source§

fn to_ne_bytes(self) -> <C as ToBytes>::Bytes

Converts a color into a byte array with native byte order.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> Scalar for Twhere T: 'static + Clone + PartialEq<T> + Debug,