Create a truecolor from three color components in the range(0->255). Args: red (float): Red component in range 0-255. green (float): Green component in range 0-255. blue (float): Blue component in range 0-255. Returns: Color: A new co
(cls, red: float, green: float, blue: float)
| 407 | |
| 408 | @classmethod |
| 409 | def from_rgb(cls, red: float, green: float, blue: float) -> "Color": |
| 410 | """Create a truecolor from three color components in the range(0->255). |
| 411 | |
| 412 | Args: |
| 413 | red (float): Red component in range 0-255. |
| 414 | green (float): Green component in range 0-255. |
| 415 | blue (float): Blue component in range 0-255. |
| 416 | |
| 417 | Returns: |
| 418 | Color: A new color object. |
| 419 | """ |
| 420 | return cls.from_triplet(ColorTriplet(int(red), int(green), int(blue))) |
| 421 | |
| 422 | @classmethod |
| 423 | def default(cls) -> "Color": |