func WriteColorFile(content string, level RecoveryLevel, size int, background,
	foreground color.Color, filename string) error {
	var q *QRCode
	q, err := New(content, level)
	q.BackgroundColor = background
	q.ForegroundColor = foreground
	if err != nil {
		return err
	}
	return q.WriteFile(size, filename)
}
WriteColorFile encodes, then writes a QR Code to the given filename in PNG format.
With WriteColorFile you can also specify the colors you want to use.

size is both the image width and height in pixels. If size is too small then
a larger image is silently written. Negative values for size cause a variable
sized image to be written: See the documentation for Image().
package qrcode
import (
	"bytes"
	"errors"
	"fmt"
	"image"
	"image/color"
	"image/png"
	"io"
	"io/ioutil"
	"log"
	"os"
	bitset "github.com/skip2/go-qrcode/bitset"
	reedsolomon "github.com/skip2/go-qrcode/reedsolomon"
)
func Encode(content string, level RecoveryLevel, size int) ([]byte, error) {
	var q *QRCode
	q, err := New(content, level)
	if err != nil {
		return nil, err
	}
	return q.PNG(size)
}
func WriteFile(content string, level RecoveryLevel, size int, filename string) error {
	var q *QRCode
	q, err := New(content, level)
	if err != nil {
		return err
	}
	return q.WriteFile(size, filename)
}