Skip to content

Clamp rgb channel values to {0...1} (i.e. 0x00 – 0xFF) when displaying as hex string #46

Closed
@mpospese

Description

@mpospese

Because we support extended RGB color space, individual channels can have values less than zero or greater than one. These do not format well for hexadecimal strings. For UIColor.rgbDisplayString we should clamp the channel values to {0...1} to avoid issues (and maybe append a ⚠️ emoji to the end of the string to indicate that its actual value is outside the bounds of the sRGB color space).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions