123456789101112131415161718 |
- package image
- import (
- "fmt"
- "image/color"
- "testing"
- )
- func TestAlpha(t *testing.T) {
- fmt.Println(color.RGBA{R: 0x33, G: 0x33, B: 0x66, A: 0xff})
- fmt.Println(Alpha("#e456499c"))
- fmt.Println(color.RGBA{R: 0x00, G: 0x00, B: 0x00, A: 0x00})
- fmt.Println(Alpha("#00000000"))
- fmt.Println(color.RGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xff})
- fmt.Println(Alpha("#ffffffff"))
- }
|