This section is empty.


View Source
var HexModel = color.ModelFunc(hexModel)

    HexModel converts any Color to an Hex color.


    func HexToRGBA

    func HexToRGBA(h Hex) (r, g, b, a uint8)

      Converts an Hex string to RGBA. If alpha is not specified, it defaults to 255 If it is not a valid hexadecimal number of the right width, a horrible yellow color is returned


      type Hex

      type Hex string

        Hex represents an RGB color in hexadecimal format.

        The length must be 3 or 6 characters, preceded or not by a '#'.

        func RGBAToHex

        func RGBAToHex(r, g, b, a uint8) Hex

          RGBAToHex converts an RGBA to a Hex string. If a == 255, the A is not specified in the hex string

          func (Hex) RGBA

          func (c Hex) RGBA() (uint32, uint32, uint32, uint32)

            RGBA returns the alpha-premultiplied red, green, blue and alpha values for the Hex.

            Source Files