We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 954b580 commit 64ddccdCopy full SHA for 64ddccd
src/color.rs
@@ -1,4 +1,12 @@
1
/// A color in the sRGB color space. Each component is in the range `[0, 1]`.
2
+///
3
+/// ## Examples
4
+/// ```
5
+/// # use mundy::Srgba;
6
+/// # let color = Srgba { red: 1., green: 0., blue: 0., alpha: 1. };
7
+/// // Convert each channels to u8
8
+/// let (r, g, b, a) = color.to_u8_array().into();
9
10
#[derive(Debug, Clone, Copy, PartialEq)]
11
pub struct Srgba {
12
pub red: f64,
0 commit comments