make-42 / gokanjivg

This go module lets you interact with the KanjiVG dataset in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GoKanjiVG

This go module lets you interact with the KanjiVG dataset in Go.

Licence

Since GoKanjiVG is a wrapper for KanjiVG you need to respect their license.

KanjiVG is released under the Creative Commons Attribution-Share Alike 3.0 licence:

https://creativecommons.org/licenses/by-sa/3.0/

As such GoKanjiVG is released under the same license.

See the file COPYING for more details.

Documentation

Methods

kanjivg.GetSVGForCharacter

kanjivg.GetSVGForCharacter(character string) (string, error)

Returns a string containing the SVG data for the character passed as input.

colorize.Colorize

colorize.Colorize(character, mode string, saturation, value float64) (string, error)

Returns a string containing colorized SVG data for the character passed as input.

mode can be "spectrum", "double-spectrum" or "pastel".

saturation and value must be contained within 0 and 1. They let you control the saturation and value of the color of the strokes when using "spectrum" or "double-spectrum" mode.

More documentation

Example usage can be found at gokanjivg-demo.

Demo

demo

Inspiration

The Colorize function is inspired by Kanji Colorise.

About

This go module lets you interact with the KanjiVG dataset in Go.

License:Other


Languages

Language:Python 86.8%Language:Go 11.5%Language:Shell 1.7%