Use shortest possible string for colours

Bug #1453733 reported by Johannes Höhn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Wishlist
Unassigned

Bug Description

Currently Inkscape is always using #rrggbb when outputting colors, when using standard settings.
There also is an option to always use CSS colour names, when possible. This option also enables #rgb output when possible.

This patch removes the option and always just uses the shortest possible string for the colour.

Tags: color svg
Revision history for this message
Johannes Höhn (johannes-karl-hoehn) wrote :
su_v (suv-lp)
tags: added: color svg
Changed in inkscape:
importance: Undecided → Wishlist
Revision history for this message
jazzynico (jazzynico) wrote :

Why should we remove an option that allows users to choose exactly the behavior they want?
I'm pretty sure that forcing the shortest possible string for the color would cause a new report claiming the change is a regression...

Revision history for this message
Johannes Höhn (johannes-karl-hoehn) wrote :

The only usecase I see for editing SVGs produced by Inkscape using a text editor is to reduce the filesize. Something this patch actually does while also reducing code size.

I see several problems with the current code:

 - The user doesn't know why she/he should set/unset the option.
 - The user could confuse this with the SVG 1.2 tiny feature of defining own named colors
 - The standard setting is the one with undesirable effects for most of the users of Inkscape, as it produces larger files.
 - It's not communicated that only this option also generates the shorter #rgb type color strings.

This also doesn't have much to do with the user's choice. If the users wants to format the SVG into a certain format she/he should use a formatter. There are lots of color formatting options that aren't supported (the rgb(x,y,z) format for instance)

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.