colors

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT 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

rovergulf/utils/colors

Go package to generate random colors

package main

import (
	"github.com/rovergulf/utils/colors"
)

func main() {
	var colorInHex string = colors.GetRandomColorInHex()
	var colorInRGB colors.RGBColor = colors.GetRandomColorInRgb()
	var colorInHSV colors.HSVColor = colors.GetRandomColorInHSV()
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandomColorInHex

func GetRandomColorInHex() string

GetRandomColorInHex returns a random color in HEX format

Types

type HSVColor

type HSVColor struct {
	Hue        float64
	Saturation float64
	Value      float64
}

HSVColor HSV Color Type

func GetRandomColorInHSV

func GetRandomColorInHSV() HSVColor

GetRandomColorInHSV returns a random color in HSV format

type RGBColor

type RGBColor struct {
	Red   int
	Green int
	Blue  int
}

RGBColor RBG Color Type

func GetRandomColorInRgb

func GetRandomColorInRgb() RGBColor

GetRandomColorInRgb Returns a random RGBColor

Jump to

Keyboard shortcuts

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