animator.skia.ColorSpace¶
- class animator.skia.ColorSpace¶
Bases:
pybind11_builtins.pybind11_object
- __init__(self: animator.skia.ColorSpace, profile: animator.skia.cms.ICCProfile) None ¶
Methods
Deserialize
(buffer)Deserialize a color space from a buffer.
Equals
(x, y)Make
(profile)MakeRGB
(transferFn, toXYZ)MakeSRGB
()__init__
(self, profile)gammaCloseToSRGB
(self)gammaIsLinear
(self)gamutTransformTo
(self, dst)Returns the matrix that transforms from this color space to the destination color space.
hash
(self)invTransferFn
(self)Returns the inverse transfer function from this color space.
isNumericalTransferFn
(self)Returns the transfer function from this color space if the transfer function can be represented as coefficients to the standard ICC 7-parameter equation.
isSRGB
(self)makeColorSpin
(self)makeLinearGamma
(self)makeSRGBGamma
(self)serialize
(self)toProfile
(self)Convert this color space to an skcms ICC profile struct and return it.
toXYZD50
(self)Returns the matrix if the color gamut can be described as a matrix.
toXYZD50Hash
(self)transferFn
(self)Returns the transfer function from this color space.
transferFnHash
(self)- static Deserialize(buffer: buffer) animator.skia.ColorSpace ¶
Deserialize a color space from a buffer.
- static Equals(x: animator.skia.ColorSpace, y: animator.skia.ColorSpace) bool ¶
- static Make(profile: animator.skia.cms.ICCProfile) animator.skia.ColorSpace ¶
- static MakeRGB(transferFn: animator.skia.cms.TransferFunction, toXYZ: animator.skia.cms.Matrix3x3) animator.skia.ColorSpace ¶
- static MakeSRGB() animator.skia.ColorSpace ¶
- static MakeSRGBLinear() animator.skia.ColorSpace ¶
- gammaCloseToSRGB(self: animator.skia.ColorSpace) bool ¶
- gammaIsLinear(self: animator.skia.ColorSpace) bool ¶
- gamutTransformTo(self: animator.skia.ColorSpace, dst: animator.skia.ColorSpace) animator.skia.cms.Matrix3x3 ¶
Returns the matrix that transforms from this color space to the destination color space.
- Parameters
dst (skia.ColorSpace) – The destination color space.
- Returns
The matrix that transforms from this color space to the destination color space.
- Return type
skia.cms.Matrix3x3
- hash(self: animator.skia.ColorSpace) int ¶
- invTransferFn(self: animator.skia.ColorSpace) animator.skia.cms.TransferFunction ¶
Returns the inverse transfer function from this color space.
- isNumericalTransferFn(self: animator.skia.ColorSpace) Optional[animator.skia.cms.TransferFunction] ¶
Returns the transfer function from this color space if the transfer function can be represented as coefficients to the standard ICC 7-parameter equation. Returns
None
otherwise (eg, PQ, HLG).- Returns
The transfer function from this color space.
- Return type
skia.cms.TransferFunction | None
- isSRGB(self: animator.skia.ColorSpace) bool ¶
- makeColorSpin(self: animator.skia.ColorSpace) animator.skia.ColorSpace ¶
- makeLinearGamma(self: animator.skia.ColorSpace) animator.skia.ColorSpace ¶
- makeSRGBGamma(self: animator.skia.ColorSpace) animator.skia.ColorSpace ¶
- serialize(self: animator.skia.ColorSpace) animator.skia.Data ¶
- toProfile(self: animator.skia.ColorSpace) animator.skia.cms.ICCProfile ¶
Convert this color space to an skcms ICC profile struct and return it.
- toXYZD50(self: animator.skia.ColorSpace) Optional[animator.skia.cms.Matrix3x3] ¶
Returns the matrix if the color gamut can be described as a matrix. Returns
None
otherwise.- Returns
The matrix describing this color space.
- Return type
skia.cms.Matrix3x3 | None
- toXYZD50Hash(self: animator.skia.ColorSpace) int ¶
- transferFn(self: animator.skia.ColorSpace) animator.skia.cms.TransferFunction ¶
Returns the transfer function from this color space.
- transferFnHash(self: animator.skia.ColorSpace) int ¶