Discover Packages
github.com/BigJk/ramen
concolor
package
Version:
v0.2.1
Opens a new window with list of versions in this module.
Published: May 30, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 9
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package concolor provides console color creation functions.
View Source
var (
Red = RGB (255, 0, 0)
Blue = RGB (0, 0, 255)
Green = RGB (0, 255, 0)
White = RGB (255, 255, 255)
Black = RGB (0, 0, 0)
)
Color represents a RGBA color in the console
Hex creates a new color from a hex string
MustHex creates a new color from a hex string and instead of returning an error if
the hex could not be parsed it will return a transparent color
RGB creates a new color from R,G,B values
RGBA creates a new color from R,G,B,A values
Floats returns the color values as floats (0f - 1f)
P returns a pointer to the color
RGBA returns the color values as uint32s
SetA creates a new color with a changed alpha value
SetB creates a new color with a changed blue value
SetG creates a new color with a changed green value
SetR creates a new color with a changed red value
Source Files
¶
Click to show internal directories.
Click to hide internal directories.