diff --git a/tensorflow_graphics/image/color_space/linear_rgb.py b/tensorflow_graphics/image/color_space/linear_rgb.py index 61b8e0272..f9524e0e7 100644 --- a/tensorflow_graphics/image/color_space/linear_rgb.py +++ b/tensorflow_graphics/image/color_space/linear_rgb.py @@ -22,6 +22,7 @@ from tensorflow_graphics.util import asserts from tensorflow_graphics.util import export_api from tensorflow_graphics.util import shape +from tensorflow_graphics.util import type_alias # Conversion constants following the naming convention from the 'theory of the # transformation' section at https://en.wikipedia.org/wiki/SRGB. @@ -31,7 +32,8 @@ _GAMMA = constants.srgb_gamma["GAMMA"] -def from_srgb(srgb, name="linear_rgb_from_srgb"): +def from_srgb(srgb: type_alias.TensorLike, + name: str = "linear_rgb_from_srgb") -> tf.Tensor: """Converts sRGB colors to linear colors. Note: diff --git a/tensorflow_graphics/image/color_space/srgb.py b/tensorflow_graphics/image/color_space/srgb.py index f65cdb4e1..8c5552edf 100644 --- a/tensorflow_graphics/image/color_space/srgb.py +++ b/tensorflow_graphics/image/color_space/srgb.py @@ -28,6 +28,7 @@ from tensorflow_graphics.util import asserts from tensorflow_graphics.util import export_api from tensorflow_graphics.util import shape +from tensorflow_graphics.util import type_alias # Conversion constants following the naming convention from the 'theory of the # transformation' section at https://en.wikipedia.org/wiki/SRGB. @@ -37,7 +38,8 @@ _GAMMA = constants.srgb_gamma["GAMMA"] -def from_linear_rgb(linear_rgb, name="srgb_from_linear_rgb"): +def from_linear_rgb(linear_rgb: type_alias.TensorLike, + name: str = "srgb_from_linear_rgb") -> tf.Tensor: """Converts linear RGB to sRGB colors. Note: