Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Svg background color
Svg background color [message #1821372] Wed, 12 February 2020 06:43 Go to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 346
Registered: August 2013
Senior Member
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 06:52 Go to previous messageGo to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 346
Registered: August 2013
Senior Member
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 10:16 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
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


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Svg background color [message #1855208 is a reply to message #1821388] Sat, 01 October 2022 07:40 Go to previous message
Vikram Vaswani is currently offline Vikram VaswaniFriend
Messages: 3
Registered: September 2022
Junior Member

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: Sat Jul 27 10:04:05 GMT 2024

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

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

Back to the top