Skip to content

simmone/racket-simple-qr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

racket-simple-qr

A Qr Code Writer Library For Racket

Install

raco pkg install simple-qr

Usage

(define (qr-write data file_name
                  #:mode [mode 'B]
                  #:error_level [error_level 'H]
                  #:module_width [module_width 5]
                  #:color [color '("black" . "white")]
                  #:output_type [output_type 'png]
                  ))

output qr code image to file.

color's form is '(front_color . background_color).

use color 'transparent to set transparent background.

Example

#lang racket

(require "../main.rkt")

(qr-write "https://github.com/simmone" "normal.png")

(qr-write "https://github.com/simmone" "normal_color.png" #:color '("#ffbb33" . "#0d47a1"))

(qr-write "https://github.com/simmone" "normal_trans.png" #:color '("#9933CC" . transparent))

(qr-write "https://github.com/simmone" "small.png" #:module_width 2)

(qr-write "https://github.com/simmone" "large.png" #:module_width 10)

(qr-write "https://github.com/simmone" "normal.svg" #:output_type 'svg)

(qr-write "https://github.com/simmone" "large.svg" #:module_width 10 #:output_type 'svg)

(qr-write "https://github.com/simmone" "normal_color.svg" #:color '("#ffbb33" . "#0d47a1") #:output_type 'svg)

(qr-write "https://github.com/simmone" "normal_trans.svg" #:color '("#9933CC" . transparent) #:output_type 'svg)

Png

normal.png:

ScreenShot

normal_color.png:

ScreenShot)

normal_trans.png:

ScreenShot

small.png:

ScreenShot

large.png:

ScreenShot

SVG

normal.svg:

ScreenShot

large.svg:

ScreenShot

normal_color.svg:

ScreenShot

normal_trans.svg:

ScreenShot

About

a qr code tool for racket-lang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published