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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址