ok

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ok contains OKLab/OKLch color implementations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	L, A, B float64
}

Color is an OKLab/OKLch color.

func FromLab

func FromLab(l, a, b float64) Color

FromLab creates a new ok color from l, a, b values.

func FromLch

func FromLch(l, c, h float64) Color

FromLch creates a new ok color from l, c, h values.

func FromRGB

func FromRGB(c blcolor.Color) Color

FromLinearRGB creates a new ok color from a linear RGB color.

func FromRGBValues

func FromRGBValues(r, g, b float64) Color

FromRGBValues creates a new ok color from red, green and blue values.

func Lerp

func Lerp(col0, col1 Color, t float64) Color

Lerp Interpolates between two ok colors.

func (Color) ToLinearSRGB

func (c Color) ToLinearSRGB() blcolor.Color

ToLinearSRGB converts this ok color to a linear RGB color.

func (Color) ToSRGB

func (c Color) ToSRGB() blcolor.Color

ToSRGB converts this ok color to a standard RGB color.

Jump to

Keyboard shortcuts

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