genc

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

README

Go Reference Go Report Card GitHub Workflow Status

genc

Simple console-aplication for generate colors in RGB and Lab models.

Getting Started

Using
params := genc.ColorPaletteParams{
    StartLight: -1,
    EndLight: 1,
    PartsAmount: 3,
}

var err error
var colorsLab [][]genc.ColorModelLab
var colorsRGB [][]genc.ColorModelRGB

// In Lab model
colorsLab, err = genc.GenColors[genc.ColorModelLab](params)

// In RGB model
colorsRGB, err = genc.GenColors[genc.ColorModelRGB](params)
Run tests
make run-tests

License

This project under Mozilla Public License Version 2.0 license, see more in LICENSE file

Author

@steelWinds

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenColors

func GenColors[T ColorModels](params ColorPaletteParams) (colors [][]T, err error)

func GetColorPalette

func GetColorPalette(params ColorPaletteParams) (clusters mclusters.Clusters, err error)

Types

type ColorModelLab

type ColorModelLab = float64

type ColorModelRGB

type ColorModelRGB = uint8

type ColorModels

type ColorModels interface {
	~ColorModelRGB | ~ColorModelLab
}

type ColorPaletteParams

type ColorPaletteParams struct {
	PartsAmount          int
	StartLight, EndLight float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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