Crate colorutils_rs Copy item path Source linear_to_planar planar_to_linear adjust_saturation avx_store_and_interleave_u8 avx_store_and_interleave_v3_direct_f32 avx_store_and_interleave_v3_f32 avx_store_and_interleave_v3_half_u8 avx_store_and_interleave_v3_quarter_u8 avx_store_and_interleave_v3_u8 avx_store_and_interleave_v4_direct_f32 avx_store_and_interleave_v4_f32 avx_store_and_interleave_v4_half_u8 avx_store_and_interleave_v4_quarter_u8 avx_store_and_interleave_v4_u8 clip_color color_add color_burn color_darken color_difference color_dodge color_exclusion color_hard_light color_hard_mix color_lighten color_linear_burn color_linear_light color_pin_light color_reflect color_screen color_soft_light color_soft_light_weight color_vivid_light load_f32_and_deinterleave load_f32_and_deinterleave_direct load_u8_and_deinterleave load_u8_and_deinterleave_half pdf_lum store_and_interleave_v3_direct_f32 store_and_interleave_v3_direct_u8 store_and_interleave_v3_f32 store_and_interleave_v3_half_u8 store_and_interleave_v3_u8 store_and_interleave_v3_u16 store_and_interleave_v4_direct_f32 store_and_interleave_v4_direct_u8 store_and_interleave_v4_f32 store_and_interleave_v4_half_u8 store_and_interleave_v4_u8 store_and_interleave_v4_u16 Hsl Represents HSL (hue, saturation, lightness) colorspace, H ∈ [0, 360f32], s ∈ [0f32, 1f32], v ∈ [0f32, 1f32] Hsv Represents HSV (hue, saturation, value) colorspace, H ∈ [0, 360f32], s ∈ [0f32, 1f32], v ∈ [0f32, 1f32] Jzazbz Represents Jzazbz Jzczhz Represents Jzazbz in polar coordinates as Jzczhz LAlphaBeta Represents l-alpha-beta (lαβ) colorspace LCh Representing a color in cylindrical CIE LCh(uv) color space Lab Represents CIELAB color space. Luv Struct representing a color in CIE LUV, a.k.a. L*u*v*, color space Oklab Struct that represent Oklab colorspace Oklch Represents Oklch colorspace Rgb Represents any RGB values, Rgb, Rgb etc. Rgb565 Represents RGB 565 color in one u16 Rgba Represents any RGBA values, Rgba, Rgba etc. Rgba1010102 Represents RGBA 1010102 in one u32 store Sigmoidal Represents color as sigmoid function: y = 1 / (1 + exp(-x))
and it’s inverse
x = ln(y / (1 - y))
Xyb XYB is a color space that was designed for use with the JPEG XL Image Coding System. Xyz A CIE 1931 XYZ color. TransferFunction Declares transfer function for transfer components into a linear colorspace and its inverse SRGB_TO_XYZ_D50 sRGB to XYZ transformation matrix, D50 White point SRGB_TO_XYZ_D65 sRGB to XYZ transformation matrix, D65 White point XYZ_TO_SRGB_D50 XYZ to sRGB transformation matrix, D50 White point XYZ_TO_SRGB_D65 XYZ to sRGB transformation matrix, D65 White point EuclideanDistance Trait that implements Euclidean distance for color TaxicabDistance Computes taxicab distance for color, better works for La b ToRgb565 ToRgba8 ToRgba1010102 ToRgbaF16 ToRgbaF32 append_alpha Adds alpha plane into an existing RGB/XYZ/LAB or other 3 plane image. Image will become RGBA, XYZa, LABa etc. bgr_to_bgra Expands BGR to BGRA. bgr_to_jzazbz This function converts BGR to Jzazbz against D65 white point. This is much more effective than naive direct transformation bgr_to_jzczhz This function converts BGR to Jzczhz against D65 white point. This is much more effective than naive direct transformation bgr_to_lab This function converts BGR to CIE L*ab against D65 white point. This is much more effective than naive direct transformation bgr_to_lalphabeta This function converts BGR to lαβ against D65 white point. This is much more effective than naive direct transformation bgr_to_lch This function converts BGR to CIE L*C*h against D65 white point. This is much more effective than naive direct transformation bgr_to_linear This function converts BGR to linear bgr_to_linear_u8 This function converts BGR to Linear. This is much more effective than naive direct transformation bgr_to_luv This function converts BGR to CIE L*ab against D65 white point. This is much more effective than naive direct transformation bgr_to_oklab This function converts BGR to Oklab against D65 white point. This is much more effective than naive direct transformation bgr_to_oklch This function converts BGR to Oklch against D65 white point. This is much more effective than naive direct transformation bgr_to_xyz This function converts BGR to XYZ. This is much more effective than naive direct transformation bgra_to_hsl This function converts BGRA to HSL. Alpha channel is copied and leaved unchanged. This is much more effective than naive direct transformation bgra_to_hsv This function converts BGRA to HSV. Alpha channel is copied and leaved unchanged. This is much more effective than naive direct transformation bgra_to_jzazbz This function converts BGRA to Jzazbz against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation bgra_to_jzczhz This function converts BGRA to Jzczhz against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation bgra_to_lab_with_alpha This function converts BGRA to CIE L*ab. bgra_to_laba This function converts BGRA to CIE L*ab against D65 white point and preserving and linearizing alpha channels. This is much more effective than naive direct transformation bgra_to_lalphabeta This function converts BGRA to lαβ against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation bgra_to_lch_with_alpha This function converts BGRA to CIE LCH against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation bgra_to_linear This function converts BGRA to Linear. bgra_to_linear_u8 This function converts BGRA to Linear, Alpha channel is normalized. This is much more effective than naive direct transformation bgra_to_luv_with_alpha This function converts BGRA to CIE L*uv. bgra_to_oklab This function converts BGRA to Oklab against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation bgra_to_oklch This function converts BGRA to Oklch against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation bgra_to_sigmoidal This function converts BGRA to Sigmoidal. Alpha channel will be normalized. This is much more effective than naive direct transformation bgra_to_xyz_with_alpha This function converts BGRA to CIE XYZ against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation bt1361_from_linear Gamma transfer function for Bt.1361 bt1361_to_linear Linear transfer function for Bt.1361 gamma2p2_from_linear Pure gamma transfer function for gamma 2.2 gamma2p2_to_linear Linear transfer function for gamma 2.2 gamma2p8_from_linear Pure gamma transfer function for gamma 2.8 gamma2p8_to_linear Linear transfer function for gamma 2.8 hlg_from_linear Gamma transfer function for HLG hlg_to_linear Linear transfer function for HLG hsl_to_bgra This function converts HSL to BGRA. This is much more effective than naive direct transformation hsl_to_rgb This function converts HSL to RGB. This is much more effective than naive direct transformation hsl_to_rgba This function converts HSL to RGBA. Alpha channel is copied and leaved unchanged. This is much more effective than naive direct transformation hsv_to_bgra This function converts HSV to BGRA. This is much more effective than naive direct transformation hsv_to_rgb This function converts HSV to RGB. This is much more effective than naive direct transformation hsv_to_rgba This function converts HSV to RGBA. Alpha channel is copied and leaved unchanged. This is much more effective than naive direct transformation jzazbz_to_bgr This function converts Jzazbz to BGR. This is much more effective than naive direct transformation jzazbz_to_bgra This function converts Jzazbz with interleaved alpha channel to BGRA. This is much more effective than naive direct transformation jzazbz_to_rgb This function converts Jzazbz to RGB. This is much more effective than naive direct transformation jzazbz_to_rgba This function converts Jzazbz with interleaved alpha channel to RGBA. This is much more effective than naive direct transformation jzczhz_to_bgr This function converts Jzczhz to BGR. This is much more effective than naive direct transformation jzczhz_to_bgra This function converts Jzczhz with interleaved alpha channel to BGRA. This is much more effective than naive direct transformation jzczhz_to_rgb This function converts Jzczhz to RGB. This is much more effective than naive direct transformation jzczhz_to_rgba This function converts Jzczhz with interleaved alpha channel to RGBA. This is much more effective than naive direct transformation lab_to_bgr This function converts LAB to BGR. This is much more effective than naive direct transformation lab_to_rgb This function converts LAB to RGB. This is much more effective than naive direct transformation lab_to_srgb This function converts LAB to RGB. This is much more effective than naive direct transformation lab_with_alpha_to_bgra This function converts LAB with separate alpha channel to BGRA. This is much more effective than naive direct transformation lab_with_alpha_to_rgba This function converts LAB with interleaved alpha channel to RGBA. This is much more effective than naive direct transformation laba_to_srgb This function converts LAB with separate alpha channel to RGBA. This is much more effective than naive direct transformation lalphabeta_to_bgr This function converts lαβ to BGR. This is much more effective than naive direct transformation lalphabeta_to_bgra This function converts lαβ with interleaved alpha channel to BGRA. This is much more effective than naive direct transformation lalphabeta_to_rgb This function converts lαβ to RGB. This is much more effective than naive direct transformation lalphabeta_to_rgba This function converts lαβ with interleaved alpha channel to RGBA. This is much more effective than naive direct transformation lch_to_bgr This function converts LCH to RGB. This is much more effective than naive direct transformation lch_to_rgb This function converts LCH to RGB. This is much more effective than naive direct transformation lch_with_alpha_to_bgra This function converts LCH with separate alpha channel to BGRA. This is much more effective than naive direct transformation lch_with_alpha_to_rgba This function converts LCH with separate alpha channel to RGBA. This is much more effective than naive direct transformation linear_to_bgr This function converts Linear BGR to Gamma BGR. This is much more effective than naive direct transformation linear_to_bgra This function converts Linear BGRA to BGRA, Alpha channel will de dernormalizaed. This is much more effective than naive direct transformation linear_to_rgb This function converts Linear to RGB. This is much more effective than naive direct transformation linear_to_rgba This function converts Linear RGBA to RGBA, Alpha channel will be denormalized. This is much more effective than naive direct transformation linear_u8_to_bgr This function converts Linear BGR to Gamma BGR. This is much more effective than naive direct transformation linear_u8_to_bgra This function converts Linear BGRA to BGRA, Alpha channel will de dernormalizaed. This is much more effective than naive direct transformation linear_u8_to_rgb This function converts Linear to RGB. This is much more effective than naive direct transformation linear_u8_to_rgba This function converts Linear RGBA to RGBA, Alpha channel will be denormalized. This is much more effective than naive direct transformation log100_from_linear Gamma transfer function for Log100 log100_sqrt10_from_linear Gamma transfer function for Log100Sqrt10 log100_sqrt10_to_linear Linear transfer function for Log100Sqrt10 log100_to_linear Linear transfer function for Log100 luv_to_bgr This function converts LUV to RGB. This is much more effective than naive direct transformation luv_to_rgb This function converts LUV to RGB. This is much more effective than naive direct transformation luv_with_alpha_to_bgra This function converts LUV with separate alpha channel to BGRA. This is much more effective than naive direct transformation luv_with_alpha_to_rgba This function converts LUV with separate alpha channel to RGBA. This is much more effective than naive direct transformation oklab_to_bgr This function converts Oklab to BGR. This is much more effective than naive direct transformation oklab_to_bgra This function converts Oklab with interleaved alpha channel to BGRA. This is much more effective than naive direct transformation oklab_to_rgb This function converts Oklab to RGB. This is much more effective than naive direct transformation oklab_to_rgba This function converts Oklab with interleaved alpha channel to RGBA. This is much more effective than naive direct transformation oklch_to_bgr This function converts Oklch to BGR. This is much more effective than naive direct transformation oklch_to_bgra This function converts Oklch with interleaved alpha channel to BGRA. This is much more effective than naive direct transformation oklch_to_rgb This function converts Oklch to RGB. This is much more effective than naive direct transformation oklch_to_rgba This function converts Oklch with interleaved alpha channel to RGBA. This is much more effective than naive direct transformation pq_from_linear Gamma transfer function for PQ pq_to_linear Linear transfer function for PQ pure_gamma_function Pure gamma transfer function for gamma 2.2 rec709_from_linear Gamma transfer function for Rec.709 rec709_to_linear Linear transfer function for Rec.709 rgb_to_hsl This function converts RGB to HSL. This is much more effective than naive direct transformation rgb_to_hsv This function converts RGB to HSV. This is much more effective than naive direct transformation rgb_to_jzazbz This function converts RGB to Jzazbz against D65 white point. This is much more effective than naive direct transformation rgb_to_jzczhz This function converts RGB to Jzczhz against D65 white point. This is much more effective than naive direct transformation rgb_to_lab This function converts RGB to CIE L*ab against D65 white point. This is much more effective than naive direct transformation rgb_to_lalphabeta This function converts RGB to lαβ against D65 white point. This is much more effective than naive direct transformation rgb_to_lch This function converts RGB to CIE L*C*h against D65 white point. This is much more effective than naive direct transformation rgb_to_linear This function converts RGB to linear colorspace rgb_to_linear_u8 This function converts RGB to Linear. This is much more effective than naive direct transformation rgb_to_luv This function converts RGB to CIE L*uv against D65 white point. This is much more effective than naive direct transformation rgb_to_oklab This function converts RGB to Oklab against D65 white point. This is much more effective than naive direct transformation rgb_to_oklch This function converts RGB to Oklch against D65 white point. This is much more effective than naive direct transformation rgb_to_rgba Expands RGB to RGBA. rgb_to_sigmoidal This function converts RGB to Sigmoidal. This is much more effective than naive direct transformation rgb_to_xyz This function converts RGB to XYZ. This is much more effective than naive direct transformation rgba_to_hsl This function converts RGBA to HSL. Alpha channel is copied and leaved unchanged. This is much more effective than naive direct transformation rgba_to_hsv This function converts RGBA to HSV. Alpha channel is copied and leaved unchanged. This is much more effective than naive direct transformation rgba_to_jzazbz This function converts RGBA to Jzazbz against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation rgba_to_jzczhz This function converts RGBA to Jzczhz against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation rgba_to_lab This function converts RGBA to CIE L*ab against D65 white point without alpha. This is much more effective than naive direct transformation rgba_to_lab_with_alpha This function converts RGBA to CIE L*ab. rgba_to_laba This function converts RGBA to CIE L*ab against D65 white point and preserving and normalizing alpha channels. This is much more effective than naive direct transformation rgba_to_lalphabeta This function converts RGBA to lαβ against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation rgba_to_lch_with_alpha This function converts RGBA to CIE LCH against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation rgba_to_linear This function converts RGBA to liner color space rgba_to_linear_u8 This function converts RGBA to Linear, Alpha channel is normalized. This is much more effective than naive direct transformation rgba_to_luv_with_alpha This function converts RGBA to CIE L*uv. rgba_to_oklab This function converts RGBA to Oklab against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation rgba_to_oklch This function converts RGBA to Oklch against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation rgba_to_sigmoidal This function converts RGBA to Sigmoidal. Alpha channel will be normalized. This is much more effective than naive direct transformation rgba_to_xyz This function converts RGBA to XYZ. This is much more effective than naive direct transformation rgba_to_xyz_with_alpha This function converts RGBA to CIE XYZ against D65 white point and preserving and normalizing alpha channels keeping it at last positions. This is much more effective than naive direct transformation rgba_to_xyza This function converts RGBA to XYZ with preserving and linearizing alpha channels. This is much more effective than naive direct transformation sigmoidal_to_bgra This function converts Sigmoid to BGRA. Alpha channel expected to be normalized and will be denormalized during transformation. This is much more effective than naive direct transformation sigmoidal_to_rgb This function converts Sigmoid to RGB. This is much more effective than naive direct transformation sigmoidal_to_rgba This function converts Sigmoid to RGBA. Alpha channel expected to be normalized and will be denormalized during transformation. This is much more effective than naive direct transformation smpte240_from_linear Gamma transfer function for Smpte 240 smpte240_to_linear Linear transfer function for Smpte 240 smpte428_from_linear Gamma transfer function for Smpte 428 smpte428_to_linear Linear transfer function for Smpte 428 srgb_from_linear Gamma transfer function for sRGB srgb_to_linear Linear transfer function for sRGB srgb_to_xyz This function converts sRGB D65 to XYZ. This is much more effective than naive direct transformation srgba_to_xyz This function converts sRGB RGBA D65 to XYZ. This is much more effective than naive direct transformation srgba_to_xyza This function converts RGBA to XYZ with preserving and linearizing alpha channels. This is much more effective than naive direct transformation trc_linear Gamma transfer function for HLG xyz_to_bgr This function converts XYZ to BGR. This is much more effective than naive direct transformation xyz_to_rgb This function converts XYZ to RGB. This is much more effective than naive direct transformation xyz_to_srgb This function converts XYZ to sRGB D65 White point. This is much more effective than naive direct transformation xyz_with_alpha_to_bgra This function converts XYZ with separate alpha channel to BGRA. This is much more effective than naive direct transformation xyz_with_alpha_to_rgba This function converts XYZ with separate alpha channel to RGBA. This is much more effective than naive direct transformation xyza_to_rgba This function converts XYZ with separate alpha channel to RGBA. This is much more effective than naive direct transformation