Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Difference ¶
Types ¶
type LinearSRGB ¶
type LinearSRGB RGB
func (LinearSRGB) Oklab ¶
func (c LinearSRGB) Oklab() Oklab
func (LinearSRGB) SRGB ¶
func (c LinearSRGB) SRGB() SRGB
type Oklab ¶
type Oklab Lab
func (Oklab) LinearSRGB ¶
func (c Oklab) LinearSRGB() LinearSRGB
LinearSRGB converts from Oklab to linear sRGB, without applying gamut mapping. That is, if the color falls outside the sRGB gamut, the resulting R, G, and B channels may have values larger than 1 or less than 0. You can use Oklch.MapToSRGBGamut to prevent this from happening.
type Oklch ¶
type Oklch LCh
func (Oklch) MapToSRGBGamut ¶
func (c Oklch) MapToSRGBGamut() LinearSRGB
MapToSRGBGamut maps colors that fall outside the sRGB gamut to the sRGB gamut. It uses the same algorithm as CSS Color Module Level 4. Note that the mapping implements a relative colorimetric intent. That is, colors that are already inside the gamut are unchanged. This is intended for mapping individual colors, not for mapping images.
Click to show internal directories.
Click to hide internal directories.