package main

import (
	"fmt"
	"os"
	"strconv"

	"code.ur.gs/lupine/ordoor/internal/palettes"
)

func main() {
	switch os.Args[1] {
	case "index", "i":
		idx, err := strconv.ParseInt(os.Args[2], 16, 64)
		if err != nil {
			fmt.Println("Usage: palette-idx index <0-255> <name>")
			os.Exit(1)
		}

		fmt.Printf("%vPalette[%v]: %#v\n", os.Args[3], idx, palettes.Palettes[os.Args[3]][idx])
	case "color", "colour", "c":
		fmt.Println("TODO!")
		os.Exit(1)
	}

}
