Skip to content

Instantly share code, notes, and snippets.

@joaofig
Created May 6, 2024 13:04
Show Gist options
  • Save joaofig/9fee9eb67f900a654c58d6e72ffb2f98 to your computer and use it in GitHub Desktop.
Save joaofig/9fee9eb67f900a654c58d6e72ffb2f98 to your computer and use it in GitHub Desktop.
Creates a 256x256 tile with a solid color.
fn make_rgba_tile(r: u8, g: u8, b: u8, a: u8) -> RgbaImage {
ImageBuffer::from_pixel(256, 256, Rgba([r, g, b, a]))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment