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.

Upscaled RGB Range #66

Closed
Closed
@mark-meyer

Description

@mark-meyer

I was looking into an earlier issue (clamped methods of BaseRGBColor does not work as expected #64) and am confused by the 1-255 range for upscaled RGB values.

The Documentation says:

When converting to RGB, this can cause some of the coordinates to end up being out of the acceptable range (0.0-1.0 or 1-255, depending on whether your RGB color is upscaled)…

Why is the upscaled RGB range not 0-255? With the range 1-255 what upscaled value maps to black with a non-upscaled value of (0.0, 0.0, 0.0)?

>>> from colormath.color_objects import sRGBColor
>>> rgb = sRGBColor( 1,1, 1,is_upscaled=True)
>>> rgb
sRGBColor(rgb_r=0.00392156862745098,rgb_g=0.00392156862745098,rgb_b=0.00392156862745098)

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