1
0
Fork 0
forked from wry/wry

render: add a damage visualizer

This commit is contained in:
Julian Orth 2024-07-10 20:47:00 +02:00
parent 3f4a677d0c
commit 76a3c50560
18 changed files with 625 additions and 90 deletions

View file

@ -49,7 +49,7 @@ impl Parser for ColorParser {
3 => (s(0..1)?, s(1..2)?, s(2..3)?, u8::MAX),
4 => (s(0..1)?, s(1..2)?, s(2..3)?, s(3..4)?),
6 => (d(0..2)?, d(2..4)?, d(4..6)?, u8::MAX),
8 => (d(0..2)?, d(2..4)?, d(4..6)?, d(4..8)?),
8 => (d(0..2)?, d(2..4)?, d(4..6)?, d(6..8)?),
_ => return Err(ColorParserError::Length.spanned(span)),
};
Ok(Color::new_straight(r, g, b, a))