5be456a09f
Other color profiles and file formats are not supported yet. Should be easy to add though. Main difficulty will be profile name comparison: For example "Adobe RGB (1998)" vs just "Adobe RGB".
16 lines
310 B
Go
16 lines
310 B
Go
package colors
|
|
|
|
import "strings"
|
|
|
|
type Profile string
|
|
|
|
// Supported color profiles.
|
|
const (
|
|
Default Profile = ""
|
|
ProfileDisplayP3 Profile = "Display P3"
|
|
)
|
|
|
|
// Equal compares the color profile name case-insensitively.
|
|
func (p Profile) Equal(s string) bool {
|
|
return strings.EqualFold(string(p), s)
|
|
}
|