Skip to content

Instantly share code, notes, and snippets.

@El-Wumbus
El-Wumbus / main.rs
Created December 23, 2024 03:19
Translate GIMP Palette files into CSS.
//! Translate [GIMP Palette Format Version 2 (.gpl)](https://developer.gimp.org/core/standards/gpl/) files into CSS variables.
use std::io::BufRead;
fn main() {
let stdin = std::io::BufReader::new(std::io::stdin());
for line in stdin.lines().skip(1) {
let line = line.unwrap();
let line = line.trim();
if line.is_empty() || line.starts_with("#") || line.starts_with("Name:") || line.starts_with("Columns:") { continue; }