Created attachment 43404 [details] [TEST CASE] Test Case for Each Color Representation It would be nice to display the (valid) CSS Color style data exactly the way it was set in the source, "as authored" by the developer. User Feedback: > For the color preference in the gear menu, how about “as authored”? > So that if the style sheet says “red”, then “red” will be displayed in > the style inspector. The attached Test Case has a <style> which contains all 4 representations for a single element to make it easy to test this.
I don't think we have this information currently. We always get rgb()/rgba() colors back from the style rules. (That is one reason why the Inspector prefered those formats until you came along.)
Created attachment 74928 [details] [PATCH] Suggested solution One drawback is that cycling through the color formats may bring up same formats in one loop (not sequential).
Comment on attachment 74928 [details] [PATCH] Suggested solution View in context: https://bugs.webkit.org/attachment.cgi?id=74928&action=review > WebCore/inspector/front-end/StylesSidebarPane.js:1315 > + throw "Unknown color format: " + curFormat; This slows us down. Could we get rid of it?
Manually committed with the comment addressed: <http://trac.webkit.org/changeset/72786>