Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

convert_color crash in 2.0.2 #49

Closed
@protogeezer

Description

@protogeezer

I found the following crash...

convert_color(LCHabColor(40.,104.,40.),AdobeRGBColor)

ValueError Traceback (most recent call last)
in ()
----> 1 convert_color(LCHabColor(40.,104.,40.),AdobeRGBColor)

/Users/sjbespa/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/colormath/color_conversions.py in convert_color(color, target_cs, through_rgb_type, target_illuminant, _args, *_kwargs)
970 target_rgb=target_rgb,
971 target_illuminant=target_illuminant,
--> 972 _args, *_kwargs)
973
974 logger.debug(' |-< out %s', new_color)

/Users/sjbespa/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/colormath/color_conversions.py in XYZ_to_RGB(cobj, target_rgb, _args, *_kwargs)
375 for channel in ['r', 'g', 'b']:
376 v = linear_channels[channel]
--> 377 nonlinear_channels[channel] = math.pow(v, 1 / target_rgb.rgb_gamma)
378
379 return target_rgb(

ValueError: math domain error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions