[−][src]Struct polyhorn_ios::color::Color
A color in a color-space with an associated alpha channel.
Implementations
impl Color
[src]
pub fn rgba(red: u8, green: u8, blue: u8, alpha: f32) -> Color
[src]
This function returns a new translucent color in the sRGB color space with the given coordinates and alpha channel.
pub fn rgb(red: u8, green: u8, blue: u8) -> Color
[src]
This function returns a new opaque color in the sRGB color space with the given coordinates.
pub fn hexa(hex: u32, alpha: f32) -> Color
[src]
This function returns a new translucent color in the sRGB color space with the given hex-encoded coordinates.
pub fn hex(hex: u32) -> Color
[src]
This function returns a new opaque color in the sRGB color space with the given hex-encoded coordinates.
pub fn hsla(hue: f32, saturation: f32, lightness: f32, alpha: f32) -> Color
[src]
This function returns a new translucent color in the sRGB color space with the given coordinates after converting from the alternative HSL representation to RGB.
pub fn hsl(hue: f32, saturation: f32, lightness: f32) -> Color
[src]
This function returns a new opaque color in the sRGB color space with the given coordinates after converting from the alternative HSL representation to RGB.
pub fn display_p3_rgba(red: u8, green: u8, blue: u8, alpha: f32) -> Color
[src]
This function returns a new translucent color in the Display-P3 color space with the given coordinates and alpha channel.
pub fn display_p3_rgb(red: u8, green: u8, blue: u8) -> Color
[src]
This functions returns a new opaque color in the Display-P3 color space with the given coordinates.
pub fn transparent() -> Color
[src]
This function returns an unbiased transparent color. Specifically, when blending a non-transparent color with a transparent color, the resulting color will have the same color space and coordinate as the non-transparent color, and only the alpha channel will be blended.
pub fn alpha(&self) -> f32
[src]
This function returns the additional alpha-component of this color.
pub fn mix(self, other: Color, factor: f32) -> Color
[src]
Blends the given color with another color using the given factor (between 0.0 and 1.0).
pub fn to_display_p3(&self) -> Alpha<Rgb<DisplayP3, f32>, f32>
[src]
This function converts the color to the Display-P3 color space (if necessary) and returns the result.
pub fn to_srgb(&self) -> Alpha<Rgb<Srgb, f32>, f32>
[src]
This function converts the color to the sRGB color space (if necessary) and returns the result.
pub fn to_hex(&self) -> u32
[src]
Converts this color to sRGB and returns the resulting hex code.
Trait Implementations
impl Clone for Color
[src]
impl Convert<UIColor> for Color
[src]
impl Copy for Color
[src]
impl Debug for Color
[src]
impl FromStr for Color
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Color, <Color as FromStr>::Err>
[src]
impl NamedColor for Color
[src]
fn aliceblue() -> Color
[src]
fn antiquewhite() -> Color
[src]
fn aqua() -> Color
[src]
fn aquamarine() -> Color
[src]
fn azure() -> Color
[src]
fn beige() -> Color
[src]
fn bisque() -> Color
[src]
fn black() -> Color
[src]
fn blanchedalmond() -> Color
[src]
fn blue() -> Color
[src]
fn blueviolet() -> Color
[src]
fn brown() -> Color
[src]
fn burlywood() -> Color
[src]
fn cadetblue() -> Color
[src]
fn chartreuse() -> Color
[src]
fn chocolate() -> Color
[src]
fn coral() -> Color
[src]
fn cornflowerblue() -> Color
[src]
fn cornsilk() -> Color
[src]
fn crimson() -> Color
[src]
fn cyan() -> Color
[src]
fn darkblue() -> Color
[src]
fn darkcyan() -> Color
[src]
fn darkgoldenrod() -> Color
[src]
fn darkgray() -> Color
[src]
fn darkgreen() -> Color
[src]
fn darkgrey() -> Color
[src]
fn darkkhaki() -> Color
[src]
fn darkmagenta() -> Color
[src]
fn darkolivegreen() -> Color
[src]
fn darkorange() -> Color
[src]
fn darkorchid() -> Color
[src]
fn darkred() -> Color
[src]
fn darksalmon() -> Color
[src]
fn darkseagreen() -> Color
[src]
fn darkslateblue() -> Color
[src]
fn darkslategray() -> Color
[src]
fn darkslategrey() -> Color
[src]
fn darkturquoise() -> Color
[src]
fn darkviolet() -> Color
[src]
fn deeppink() -> Color
[src]
fn deepskyblue() -> Color
[src]
fn dimgray() -> Color
[src]
fn dimgrey() -> Color
[src]
fn dodgerblue() -> Color
[src]
fn firebrick() -> Color
[src]
fn floralwhite() -> Color
[src]
fn forestgreen() -> Color
[src]
fn fuchsia() -> Color
[src]
fn gainsboro() -> Color
[src]
fn ghostwhite() -> Color
[src]
fn gold() -> Color
[src]
fn goldenrod() -> Color
[src]
fn gray() -> Color
[src]
fn green() -> Color
[src]
fn greenyellow() -> Color
[src]
fn grey() -> Color
[src]
fn honeydew() -> Color
[src]
fn hotpink() -> Color
[src]
fn indianred() -> Color
[src]
fn indigo() -> Color
[src]
fn ivory() -> Color
[src]
fn khaki() -> Color
[src]
fn lavender() -> Color
[src]
fn lavenderblush() -> Color
[src]
fn lawngreen() -> Color
[src]
fn lemonchiffon() -> Color
[src]
fn lightblue() -> Color
[src]
fn lightcoral() -> Color
[src]
fn lightcyan() -> Color
[src]
fn lightgoldenrodyellow() -> Color
[src]
fn lightgray() -> Color
[src]
fn lightgreen() -> Color
[src]
fn lightgrey() -> Color
[src]
fn lightpink() -> Color
[src]
fn lightsalmon() -> Color
[src]
fn lightseagreen() -> Color
[src]
fn lightskyblue() -> Color
[src]
fn lightslategray() -> Color
[src]
fn lightslategrey() -> Color
[src]
fn lightsteelblue() -> Color
[src]
fn lightyellow() -> Color
[src]
fn lime() -> Color
[src]
fn limegreen() -> Color
[src]
fn linen() -> Color
[src]
fn magenta() -> Color
[src]
fn maroon() -> Color
[src]
fn mediumaquamarine() -> Color
[src]
fn mediumblue() -> Color
[src]
fn mediumorchid() -> Color
[src]
fn mediumpurple() -> Color
[src]
fn mediumseagreen() -> Color
[src]
fn mediumslateblue() -> Color
[src]
fn mediumspringgreen() -> Color
[src]
fn mediumturquoise() -> Color
[src]
fn mediumvioletred() -> Color
[src]
fn midnightblue() -> Color
[src]
fn mintcream() -> Color
[src]
fn mistyrose() -> Color
[src]
fn moccasin() -> Color
[src]
fn navajowhite() -> Color
[src]
fn navy() -> Color
[src]
fn oldlace() -> Color
[src]
fn olive() -> Color
[src]
fn olivedrab() -> Color
[src]
fn orange() -> Color
[src]
fn orangered() -> Color
[src]
fn orchid() -> Color
[src]
fn palegoldenrod() -> Color
[src]
fn palegreen() -> Color
[src]
fn paleturquoise() -> Color
[src]
fn palevioletred() -> Color
[src]
fn papayawhip() -> Color
[src]
fn peachpuff() -> Color
[src]
fn peru() -> Color
[src]
fn pink() -> Color
[src]
fn plum() -> Color
[src]
fn powderblue() -> Color
[src]
fn purple() -> Color
[src]
fn rebeccapurple() -> Color
[src]
fn red() -> Color
[src]
fn rosybrown() -> Color
[src]
fn royalblue() -> Color
[src]
fn saddlebrown() -> Color
[src]
fn salmon() -> Color
[src]
fn sandybrown() -> Color
[src]
fn seagreen() -> Color
[src]
fn seashell() -> Color
[src]
fn sienna() -> Color
[src]
fn silver() -> Color
[src]
fn skyblue() -> Color
[src]
fn slateblue() -> Color
[src]
fn slategray() -> Color
[src]
fn slategrey() -> Color
[src]
fn snow() -> Color
[src]
fn springgreen() -> Color
[src]
fn steelblue() -> Color
[src]
fn tan() -> Color
[src]
fn teal() -> Color
[src]
fn thistle() -> Color
[src]
fn tomato() -> Color
[src]
fn turquoise() -> Color
[src]
fn violet() -> Color
[src]
fn wheat() -> Color
[src]
fn white() -> Color
[src]
fn whitesmoke() -> Color
[src]
fn yellow() -> Color
[src]
fn yellowgreen() -> Color
[src]
impl PartialEq<Color> for Color
[src]
impl StructuralPartialEq for Color
[src]
impl ToTokens for Color
[src]
fn to_tokens(&self, tokens: &mut TokenStream)
[src]
fn to_token_stream(&self) -> TokenStream
[src]
fn into_token_stream(self) -> TokenStream
[src]
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
[src]
T: Any,
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
fn type_name(&self) -> &'static str
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,