Enum r3bl_rs_utils::ColorWheelConfig
source · pub enum ColorWheelConfig {
Rgb(Vec<String, Global>, ColorWheelSpeed, usize),
RgbRandom(ColorWheelSpeed),
Ansi256(Ansi256GradientIndex, ColorWheelSpeed),
Lolcat(LolcatBuilder),
}
Expand description
For RGB colors:
- The stops are the colors that will be used to create the gradient.
- The speed is how fast the color wheel will rotate.
- The steps are the number of colors that will be generated. The larger this number is the smoother the transition will be between each color. 100 is a good number to start with.
Variants§
Rgb(Vec<String, Global>, ColorWheelSpeed, usize)
RgbRandom(ColorWheelSpeed)
Ansi256(Ansi256GradientIndex, ColorWheelSpeed)
Lolcat(LolcatBuilder)
Implementations§
source§impl ColorWheelConfig
impl ColorWheelConfig
pub fn config_contains_bg_lolcat(configs: &[ColorWheelConfig]) -> bool
pub fn narrow_config_based_on_color_support( configs: &[ColorWheelConfig] ) -> ColorWheelConfig
Trait Implementations§
source§impl Clone for ColorWheelConfig
impl Clone for ColorWheelConfig
source§fn clone(&self) -> ColorWheelConfig
fn clone(&self) -> ColorWheelConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ColorWheelConfig
impl Debug for ColorWheelConfig
source§impl<'de> Deserialize<'de> for ColorWheelConfig
impl<'de> Deserialize<'de> for ColorWheelConfig
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ColorWheelConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ColorWheelConfig, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl GetSize for ColorWheelConfig
impl GetSize for ColorWheelConfig
source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
source§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
source§impl PartialEq<ColorWheelConfig> for ColorWheelConfig
impl PartialEq<ColorWheelConfig> for ColorWheelConfig
source§fn eq(&self, other: &ColorWheelConfig) -> bool
fn eq(&self, other: &ColorWheelConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ColorWheelConfig
impl Serialize for ColorWheelConfig
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ColorWheelConfig
Auto Trait Implementations§
impl RefUnwindSafe for ColorWheelConfig
impl Send for ColorWheelConfig
impl Sync for ColorWheelConfig
impl Unpin for ColorWheelConfig
impl UnwindSafe for ColorWheelConfig
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: FloatComponent, Swp: WhitePoint, Dwp: WhitePoint, D: AdaptFrom<S, Swp, Dwp, T>,
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere U: FromColor<T>,
source§fn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere U: FromColorUnclamped<T>,
source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere U: TryFromColor<T>,
source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an
OutOfBounds
error is returned which contains
the unclamped color. Read more