[−][src]Enum dither::prelude::CGA
Variants
Black
Blue
Green
Cyan
Red
Magenta
Brown
LightGray
Gray
LightBlue
LightGreen
LightCyan
LightRed
LightMagenta
Yellow
White
Methods
impl CGA
[src]
pub fn quantize(RGB: RGB<f64>) -> (RGB<f64>, RGB<f64>)
[src]
quantize a RGB triplet to the closest CGA color and error. this is a somewhat naive/ inefficient implementation; i'm sure I can do better.
impl CGA
[src]
pub const COLORS: [CGA; 16]
[src]
pub fn to_hex(self) -> u32
[src]
pub fn try_from_hex(hex: u32) -> Option<Self>
[src]
Trait Implementations
impl Eq for CGA
[src]
impl Clone for CGA
[src]
fn clone(&self) -> CGA
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Into<&'static str> for CGA
[src]
impl Copy for CGA
[src]
impl PartialEq<CGA> for CGA
[src]
fn eq(&self, other: &CGA) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl From<CGA> for RGB<u8>
[src]
impl From<CGA> for RGB<f64>
[src]
impl Debug for CGA
[src]
impl Display for CGA
[src]
impl FromStr for CGA
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.