* Bugfix: colorsys uses HLS (hue, luminance, saturation) ordering when converting to/from rgb. Manim says it uses HSL ordering. Fixed order of parameters in call to colorsys for ManimColor.from_hsl and ManimColor.to_hsl.
Added tests ensure correct HSL ordering.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update to fix the correct color tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: SonnyRoomex <sonny.campbell@roomex.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* add __hash__ to ManimColor
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update core.py
* add test
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: correct typehint
* fix test
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Experimenting with an HSL class
* Add some more functionality
* Adding a lot of tests and implementing fully functional conversion between color spaces over proxy rgba
* Fixing tests
* Fixing typing
* return str to normal
* Additional documentation
* Update manim/utils/color/core.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: adeshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Fix documentation and typing and revamp operators to respect color spaces
* Fix color operator typing and add operator tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix typeguard
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Import ManimFloat
* Update manim/utils/color/core.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Add docstring to _internal_space
* naming of functions according to pep8
* Fix naming
* Update manim/utils/color/core.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* Update manim/utils/color/core.py
Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fixes#3614
Setting background_transparency=0.0 should have the same effect than
setting transparent=True. The output format must be compatible
with transparency (.mov, .webm). Otherwise ffpmeg fails.
This patch ensures that background_transparency=0.0 triggers the
change of the output format. Also a WARNING is raised about
the change in the output format.
I want to thank @SirJamesClarkMaxwell for inspiring me to tackle
this issue.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test config.background_opacity < 1
* fix config behavior for config.background_opacity < 1
* fix logger messages being emitted twice
* actually cleanup usage of loggers, remove logger-imports; black
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* dry_run fixture
* remove debug print
* applied suggestion from review
* remove custom fixture from test_deprecation, use manim_caplog
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Optimized manim.utils.partial_bezier_points()
* Added split_bezier, subdivide_bezier and bezier_remap, and tests
* Use bezier_remap() in VMobject and OpenGLVMobject()
* Note that partial_bezier_points is similar to calling split_bezier twice
* Refactor `TexTemplate`
* Add tests, refactor some things
* Fixed Some tests
* Move typing imports
* Fix remaining tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
Co-authored-by: Jason Grace <110117391+JasonGrace2282@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* first draft of color class + starting library conversion
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changed everything to Manim color todo: figure out circular dependency in utils
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* first working draft of new color version
* resolving conflicts
* resolving conflicts
* resolving conflicts
* resolving conflicts
* resolving conflicts
* changed default internal value of ManimColor to np.ndarray[float]
* starting to fix tests
* fixed more tests and changed precision of manim color
* removed premature color conversion
* fixed some more tests
* final test changes
* fix doctests
* fix for 3.8
* fixing ManimColor string representation
* removing some unneccesary conversions
* moved community constants to manim_colors.py and added more color standards
* broke some too long lines
* added fallback: check whether passed object has get_hex method
* actually fix _internal_from_string
* added hsv support
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove dependency on colour
* fixed DARK_EARTH being assigned twice
* fixed double assignment
* remove more duplicated colour names
* raise NotImplementedError for ManimColor.gradient
* removed unused import
* remove superfluous ManimColor import
* fix circular import, remove dependency of space_ops on config
* one more Color -> ParseableManimColor
* removed one *-import
* somewhat unrelated fixed type hint
* -1 *-import
* fixed change of logic in CoordinateSystem.get_graph_label
* removed debug print; fixed type hint in mobject.py
* some fixes and improvements to text_mobject.py
* update three_dimensions
* fixes for rendered documentation of utils.color.*
* substantial improvements to documentation, including new Sphinx directive
Co-authored-by: MrDiver <mrdiverlp@gmail.com>
* Rewrite of the sphinx directive to use docutils nodes and 2 column design
* I just had to do it
* Improve the color table
* minor cleanup
* fixed ColorOverview example
* documentation improvements
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update manim/mobject/mobject.py
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix flake8 errors
* Removed test in test_text_mobject
* Improved Documentation of core.py and added private members in sphinx so that internal methods can be documented
* Change color types of labeled.py
* removed some unused imports
* turned docstring into comment
* _colors -> _all_manim_colors; move to manim_color module
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed typing
* rewrite import
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
* Migrate more `os.path` to `pathlib` in tests
* Convert test fixtures to pathlib
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix mypy errors in tests
* migrate another pathlib instance
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* start test reorganization
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* move boolean ops
* move more tests
* Move more tests
* more reorganization
* more movements
* mostly finish up reorganization
* Finish reorganization tests in parent dir
* try moving interface tests back
* Move test_commands over
* fix relative path to templates
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>