Skip to content

ManimColor: Adding documentation and examples for creating colors #3472

Closed
@ubaldot

Description

@ubaldot

Time to work with colours! :D

BG_rgb = (40, 85, 120)
hsv = ManimColor().from_rgb(color).to_hsv()

will return TypeError: ManimColor.__init__() missing 1 required positional argument: 'value', whereas the docs say

class ManimColor(value, alpha=1.0)
 
...
 PARAMETERS:
-  value (ParsableManimColor | None) – Some representation of a color (e.g., a string or a suitable tuple).

Is that None a "docs' bug"?

Questions:

  1. How shall I create a hsv ManimColor from a rgb/hsv tuple?
  2. Once I have some sort of hsv = ManimColor(... , wouldn't be nicer to access attributes e.g. with hsv.hue, hsv.saturation‚ hsv.value rather than using the .to_hsv()method?
  3. I noticed that the hsl color space has been removed, is there any special reason?
  4. Would you mind to add some examples in the docs so the users could better understand how to create their colours?

Keep up the good work !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions