color_test.go 377 B

123456789101112131415161718
  1. package image
  2. import (
  3. "fmt"
  4. "image/color"
  5. "testing"
  6. )
  7. func TestAlpha(t *testing.T) {
  8. fmt.Println(color.RGBA{R: 0x33, G: 0x33, B: 0x66, A: 0xff})
  9. fmt.Println(Alpha("#e456499c"))
  10. fmt.Println(color.RGBA{R: 0x00, G: 0x00, B: 0x00, A: 0x00})
  11. fmt.Println(Alpha("#00000000"))
  12. fmt.Println(color.RGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xff})
  13. fmt.Println(Alpha("#ffffffff"))
  14. }