hashbow

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2020 License: MIT Imports: 1 Imported by: 1

README

hashbow

Somewhat a port of https://github.com/supercrabtree/hashbow to Go. Uses https://github.com/lucasb-eyer/go-colorful underneath.

Documentation: http://godoc.org/github.com/fiatjaf/hashbow

example

package main

import (
    "github.com/fiatjaf/hashbow"
    "log"
)

func main () {
    log.Print(hashbow.Hashbow("Olivia Wilde"))
    log.Print(hashbow.Hashbow(22))
}

Will print "#8b3c61" and "#3c61d8", which are beautiful colours.

compatibility

This is not compatible with https://github.com/supercrabtree/hashbow in the sense that it will not generate the same colours from the same arguments. I want it to be compatible. Please submit a PR if know how to do it.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Color

func Color(value interface{}, saturation float64, lightness float64) colorful.Color

func Hashbow

func Hashbow(value interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL