#color #vga #pixel #rgb #converter

rgb2vga

An RGB pixel to VGA color converter implemented in rust

2 stable releases

Uses new Rust 2024

new 1.0.1 Mar 20, 2025
1.0.0 Mar 14, 2025

#638 in Images

Download history 119/week @ 2025-03-12

119 downloads per month

GPL-3.0 license

26KB
284 lines

rgb2vga

An RGB pixel to VGA color converter implemented in rust. This crate can be runned also in a no-std environment.

use rgb2vga::rgb2vga;

fn main() {
  let rgb = (250, 128, 114);
  let vga = rgb2vga(rgb);
  // do other things
}

Examples

cargo run --example simple
cargo run --example std

Dependencies

~395KB