:right-sidebar: True ColorState =================================================================== .. currentmodule:: gi.repository.Gdk .. versionadded:: 4.16 .. class:: ColorState(*args, **kwargs) :no-contents-entry: 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 ------- .. rst-class:: interim-class .. class:: ColorState :no-index: .. method:: create_cicp_params() -> ~gi.repository.Gdk.CicpParams | None Create a :obj:`~gi.repository.Gdk.CicpParams` representing the colorstate. It is not guaranteed that every ``GdkColorState`` can be represented with Cicp parameters. If that is the case, this function returns ``NULL``\. .. versionadded:: 4.16 .. method:: equal(other: ~gi.repository.Gdk.ColorState) -> bool Compares two ``GdkColorStates`` for 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. .. versionadded:: 4.16 :param other: another ``GdkColorStatee`` .. classmethod:: get_rec2100_linear() -> ~gi.repository.Gdk.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. .. versionadded:: 4.16 .. classmethod:: get_rec2100_pq() -> ~gi.repository.Gdk.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. .. versionadded:: 4.16 .. classmethod:: get_srgb() -> ~gi.repository.Gdk.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. .. versionadded:: 4.16 .. classmethod:: get_srgb_linear() -> ~gi.repository.Gdk.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. .. versionadded:: 4.16