ColorSpace enum

The color space describes the colors that are available to an Image.

This value can help decide which ImageByteFormat to use with Image.toByteData. Images that are in the extendedSRGB color space should use something like ImageByteFormat.rawExtendedRgba128 so that colors outside of the sRGB gamut aren't lost.

This is also the result of Image.colorSpace.

See also: https://en.wikipedia.org/wiki/Color_space

Inheritance

Values

sRGB → const ColorSpace

The sRGB color space.

You may know this as the standard color space for the web or the color space of non-wide-gamut Flutter apps.

See also: https://en.wikipedia.org/wiki/SRGB

extendedSRGB → const ColorSpace

A color space that is backwards compatible with sRGB but can represent colors outside of that gamut with values outside of 0..1. In order to see the extended values an ImageByteFormat like ImageByteFormat.rawExtendedRgba128 must be used.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<ColorSpace>
A constant List of the values in this enum, in order of their declaration.