ColorState#
Added in version 4.16.
- class ColorState(*args, **kwargs)#
A GdkColorState object provides the information to interpret
colors and pixels in a variety of ways.
They are also known as *color spaces*.
Crucially, GTK knows how to convert colors from one color state to another.
GdkColorState objects are immutable and therefore threadsafe.
Methods#
- class ColorState
- create_cicp_params() CicpParams | None#
- Create a - CicpParamsrepresenting the colorstate.- It is not guaranteed that every - GdkColorStatecan be represented with Cicp parameters. If that is the case, this function returns- NULL.- Added in version 4.16. 
 - equal(other: ColorState) bool#
- Compares two - GdkColorStatesfor equality.- Note that this function is not guaranteed to be perfect and two objects describing the same color state may compare not equal. However, different color states will never compare equal. - Added in version 4.16. - Parameters:
- other – another - GdkColorStatee
 
 - classmethod get_rec2100_linear() ColorState#
- Returns the color state object representing the linear rec2100 color space. - This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and a linear transfer function. - It is equivalent to the Cicp tuple 9/8/0/1. - See e.g. the CSS HDR Module for details about this colorstate. - Added in version 4.16. 
 - classmethod get_rec2100_pq() ColorState#
- Returns the color state object representing the rec2100-pq color space. - This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and the transfer function defined by SMPTE ST 2084 and BT.2100-2. - It is equivalent to the Cicp tuple 9/16/0/1. - See e.g. the CSS HDR Module for details about this colorstate. - Added in version 4.16. 
 - classmethod get_srgb() ColorState#
- Returns the color state object representing the sRGB color space. - This color state uses the primaries defined by BT.709-6 and the transfer function defined by IEC 61966-2-1. - It is equivalent to the Cicp tuple 1/13/0/1. - See e.g. the CSS Color Module for details about this colorstate. - Added in version 4.16. 
 - classmethod get_srgb_linear() ColorState#
- Returns the color state object representing the linearized sRGB color space. - This color state uses the primaries defined by BT.709-6 and a linear transfer function. - It is equivalent to the Cicp tuple 1/8/0/1. - See e.g. the CSS Color Module for details about this colorstate. - Added in version 4.16.