Skip to main content



      Home
Home » Eclipse Projects » Sirius » Svg background color
Svg background color [message #1821372] Wed, 12 February 2020 01:43 Go to next message
Eclipse UserFriend
Hi

Is it possible to an svg's background color to a fixed value, so Sirius will not change it? Please see the attached screenshot (figure "asd" on the diagram). All colors (background, label, border) are set epc_purple. But background color is lighter.

I need to set background to dark purple (see figure "qwewqe").

The left figure has WorkspaceImageDescription style, and the right figure has BundledImageDescription style. It seems that background colors are auto-adjusted for BundledImageDescription. Is it possible to disable it?
Re: Svg background color [message #1821373 is a reply to message #1821372] Wed, 12 February 2020 01:52 Go to previous messageGo to next message
Eclipse UserFriend
As a workaround I removed the following from plugin.xml (extension point org.eclipse.sirius.diagram.customBundledImageShape) and set a background color to a fixed value:

      <colorIdentifier colorIdentifier="shape"></colorIdentifier>
      <colorAttribute colorAttribute="fill"></colorAttribute>
Re: Svg background color [message #1821388 is a reply to message #1821373] Wed, 12 February 2020 05:16 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Indeed, each attribute (color, borderColor and borderSize) of the SVG that is modified by the extension point if optional. If you do not want one to be modified, you do not add it to the extension point as you did.

Best regards,
Steve
Re: Svg background color [message #1855208 is a reply to message #1821388] Sat, 01 October 2022 03:40 Go to previous message
Eclipse UserFriend

Old topic, but would like to add you can simply use CSS like below change color

svg path{ fill:red }


You can also other ways here:
https://qawithexperts.com/article/html/how-to-change-color-of-svg-various-ways-using-css/414

Thanks
Previous Topic:Do not populate Diagrams
Next Topic:Diagram elements are hidden after the tool migration to a newer sirius and obeonetwork version
Goto Forum:
  


Current Time: Tue Jul 08 20:19:31 EDT 2025

Powered by FUDForum. Page generated in 0.08619 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top