You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
408 B

2 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "git.aiterp.net/lucifer3/server/internal/color"
  5. "os"
  6. )
  7. func main() {
  8. col := color.MustParse(os.Args[len(os.Args)-1])
  9. if col, ok := col.ToXY(); ok {
  10. fmt.Println(col.String())
  11. }
  12. if col, ok := col.ToHS(); ok {
  13. fmt.Println(col.String())
  14. }
  15. if col, ok := col.ToHSK(); ok {
  16. fmt.Println(col.String())
  17. }
  18. if col, ok := col.ToRGB(); ok {
  19. fmt.Println(col.String())
  20. }
  21. }