Make read only buffers feel more read only
This commit is contained in:
parent
84171787a5
commit
6877bd4969
4 changed files with 29 additions and 4 deletions
|
@ -339,6 +339,15 @@ impl Hsla {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn grayscale(&self) -> Self {
|
||||
Hsla {
|
||||
h: self.h,
|
||||
s: 0.,
|
||||
l: self.l,
|
||||
a: self.a,
|
||||
}
|
||||
}
|
||||
|
||||
/// Fade out the color by a given factor. This factor should be between 0.0 and 1.0.
|
||||
/// Where 0.0 will leave the color unchanged, and 1.0 will completely fade out the color.
|
||||
pub fn fade_out(&mut self, factor: f32) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue