colour

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: BSD-3-Clause Imports: 8 Imported by: 3

Documentation

Overview

Package colour provides methods for working with colour profiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdobeRGBTransformation

func NewAdobeRGBTransformation(ctx context.Context, uri string) (transform.Transformation, error)

NewAdobeRGBTransformation returns a new `AdobeRGBTransformationTransformation` instance configured by 'uri' which is expected to take the form of:

adobergb://

func NewDisplayP3Transformation

func NewDisplayP3Transformation(ctx context.Context, uri string) (transform.Transformation, error)

NewDisplayp3Transformation returns a new `Displayp3TransformationTransformation` instance configured by 'uri' which is expected to take the form of:

displayp3://

func ToAdobeRGB

func ToAdobeRGB(im image.Image) image.Image

ToAdobeRGB converts all the colours in 'im' to match the Adobe RGB colour profile.

func ToDisplayP3

func ToDisplayP3(im image.Image) image.Image

ToDisplayP3 converts all the coloura in 'im' to match the Apple Display P3 colour profile.

Types

type AdobeRGBTransformation

type AdobeRGBTransformation struct {
	transform.Transformation
}

AdobeRGBTransformation implements the `transform.Transformation` interface for converting all the colours in an image to match the Adobe RGB colour profile.

func (*AdobeRGBTransformation) Transform

func (tr *AdobeRGBTransformation) Transform(ctx context.Context, im image.Image) (image.Image, error)

Transform converts all the colours in 'im' to match the Adobe RGB colour profile.

type DisplayP3Transformation

type DisplayP3Transformation struct {
	transform.Transformation
}

Displayp3Transformation implements the `transform.Transformation` interface for converting all the colours in an image to match the Apple Display P3 colour profile.

func (*DisplayP3Transformation) Transform

func (tr *DisplayP3Transformation) Transform(ctx context.Context, im image.Image) (image.Image, error)

Transform converts all the colours in 'im' to match the Apple Display P3 colour profile.

Jump to

Keyboard shortcuts

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