remove last color conversion from render loop

This commit is contained in:
🪞👃🪞 2025-01-20 16:27:16 +01:00
parent a31de6e819
commit 7ad574cf2a
9 changed files with 122 additions and 47 deletions

View file

@ -90,8 +90,8 @@ impl ItemColor {
impl ItemPalette {
pub const G: [Self;256] = {
let mut builder = konst::array::ArrayBuilder::new();
let mut index = 0;
while !builder.is_full() {
let index = builder.len() as u8;
let light = (index as f64 * 1.3) as u8;
let lighter = (index as f64 * 1.6) as u8;
let lightest = (index as f64 * 1.9) as u8;
@ -107,7 +107,6 @@ impl ItemPalette {
darker: ItemColor::from_rgb(Color::Rgb(darker, darker, darker, )),
darkest: ItemColor::from_rgb(Color::Rgb(darkest, darkest, darkest, )),
});
index += 1;
}
builder.build()
};