Percentage and/or extended range for color values

Bug #555017 reported by Rena Kunisaki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Won't Fix
Wishlist
Jon A. Cruz

Bug Description

Currently it's possible to define colours as RGB or HSL in the range 0-255. While this is adequate for most applications, it has some limitations when adjusting colours, and I personally feel vector graphics should allow more precision for colours the same as they do for coordinates.

The proposal is to allow colours to be outside of the 0-255 range, and clip them when rendering. This prevents unwanted clipping when adjusting colours. To see an example of this:
1) Create three objects with the same fill colour, with a lightness around 127.
2) Increase the lightness of one to 249.
3) Select all three objects.
4) Go to Extensions, Color, More Light. The Lightness of all objects is increased by 12.
5) Go to Extensions, Color, Less Light. The Lightness of all objects is decreased by 13 (not 12?).
6) Observe that the lightness of the object from step 2 is now 242.
This is because in step 4, 249+12 is clipped to 255. To avoid this problem, the color should be allowed to increase to 261, which would be rendered as 255. The same is true of darkening, where a color value could end up below zero.

Additionally, CSS allows colors to be defined as floating-point percentage values. This allows for more precision that may be useful when rendering to a device capable of more than 24-bit color. Inkscape should be able to do this as well.
Using floating-point values for colors also avoids a similar issue to the one mentioned above where color/lightness/etc are being multiplied.

(See also: Bug #551254)

Tags: color wishlist
description: updated
Revision history for this message
Jon A. Cruz (jon-joncruz) wrote :

SVG limits colors to 8-bit RGB values in the sRGB colorspace. Inkscape needs to comply with that.

To work with colors outside of the average monitor's display capabilities, color management is used. Inkscape provides the CMS color picker to select a linked ICC color profile that describes some target output device's color capabilities. When values outside of those in sRGB are selected they get clipped in the fallback RGB values set in the file.

So inkscape is already allowing values to be outside of 0-255 sRGB, and does clip them as needed for display fallback. The values are determined by the details of the ICC profile and most commonly use 0.0 - 1.0 floating point for RGB ones, etc.

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Won't Fix
assignee: nobody → Jon A. Cruz (jon-joncruz)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.