I am reading some data from a javascript file and obtain the background color from it, it seems very simple but I cant find the proper function to dynamicly changed the background color base on these values. I have already tried changing configurations but it doesnot work, beacause the group of configlabels is not available for this colors.
BR,
Related
I am looking for changing colors of an illustration svg in flutter. I tried flutter_svg package but it support applying only one color to the svg and if I do that svg will be displayed as a single color svg, individual colors are lost. Is there any way to change colors at runtime in flutter for a multi color svg?
Do you mean something like this? I call it SVG colorization.
I'll try to squeeze the concept into a short summary. In an SVG file, you need to play around with the fill property as it defines the hex color code.
In terms of programming, you would:
Extract the SVG file data as a String variable svgCode.
Assign the previous hex color code in previousColor & the currently selected hex color code in newColor.
Apply the String.replaceAll method on svgCode to replace the colors.
Update the value of the previousColor.
A more brief elaboration would be
/// Initially without any color selection.
SVGPicture.string('''<svg code with fill #f7ebcb>''');
/// After the user selects the red color.
SVGPicture.string('''<svg code with fill #FF0000>''');
This tutorial can help to solve your issue. Not only does this app changes the color on runtime, but it also allows the user to download the manipulated SVG code.
In my application the users can create a list of names associated with icons and colours. I've got the data stored in a GtkListStore and displayed using a GtkTreeView. The colour column is a GtkCellRendererText with the background-rgba property holding an opaque colour selected by the user. It looks like this.
However as you can see the selection bar hides the currently selected colour. The colour definition I've used in the CSS is alpha(#cce8ff, 0.5) and I know that the alpha is working because the colour fades out when I decrease the alpha value.
What I want is for the background colour in the cell to be visible through the selection highlight, although I could also live with the background colour blocking the selection highlight in that cell as long as the selected row was still clearly identified.
Is there some incantation I can use to achieve this? Or is this a bug in GTK3?
I'm using GTK 3.24.1 on Fedora 29. The application is written in Haskell using the gi-gtk binding.
I'm trying to create a generalized function/class that builds embedded hyperlinks. I am using an NSAttributedString with NSAttributedString.Key.link attribute and assigning a URL to the specified range. I can even specify multiple links within the body of text, with specific styles for the text. However the only caveat that I am seeing is that the highlighted state of the links have a grey background color. Is there a way to get rid of this background color, and on top of that assign a specified highlight state color for the link?
I am open to other means of creating the text and links, but I feel like NSAttributedString is the right means.
Again:
the body of text should be able to handle any number of links
each link can contain any number of words
the highlighted state shouldn't have a background color of grey, and be able to accept a specified color for a highlight state
the text should be able to wrap if needed
I'm new with TinyMCE and trying to set the size of some of the buttons in the editor to small and some others' to medium, in TinyMCE 4.
I know about this property toolbar_items_size but this sets all the button's size small or medium. Instead, I'm trying to set the size property of the buttons in editor.buttons[] manually after the buttons get registered with the editor but before the theme gets initialized since the theme uses Factory.create() to create buttons & that sets class btn-<size> to the button, which sets its size.
I've looked into TinyMCE's code too but have not able to figure out a way to do so. Also, I've observed that all the editor's events get fired after the theme gets initialized, like BeforeSetContent,..etc.
I'm using modern theme.
Is there some way to achieve this?
Thanks.
TinyMCE simply does not support what you are trying to do - the buttons on the toolbar(s) are a uniform size. You can pick that uniform size (as you reference) but you can't mix buttons of different sizes on the toolbar.
I am writing a module for a VB.NET web page, which takes values from a database and inserts them into Office documents. Using the Open XML SDK in Visual Studio, I have managed to modify both Excel and PowerPoint files, but I have an issue with the color in PowerPoint's charts:
How can I change the color of a PowerPoint chart using the Open XML SDK, without also making the color separate itself from the theme?
Details below.
After adding my values to the worksheet behind the chart, and updating the visual lines/bars, all of the series appear to be using the same color. Therefore I also need to set the color of the series in the chart. I currently do this with the following code:
Dim barChart1 As DocumentFormat.OpenXml.Drawing.Charts.BarChart = chartPart.ChartSpace.Descendants(Of BarChart).First
Dim barChartSeries = barChart1.Descendants(Of BarChartSeries).ToList
barChartSeries(0).ChartShapeProperties.Descendants(Of SolidFill).First.SchemeColor = New SchemeColor() With
{ .Val = DocumentFormat.OpenXml.Drawing.SchemeColorValues.Accent4}
Basically, I set the first bar in the chart to use Accent4 as its color. Accent1, 2, 3 and so on correspond to the colors in the color palette of the PowerPoint presentation's theme. After this code runs, the first bar of the chart will be using the fourth color of the current palette.
The problem I'm facing is that after the color is set with code, the color value appears to be saved separately from the actual theme colors.
If I open the PowerPoint file and change the theme, all colors change except the ones I modified. In this example, the first bar of the chart would keep the fourth color for the previous theme, instead of using the fourth color of the new theme as it's supposed to.
This becomes a problem because my company's clients are supposed to be able to change the theme to one that suits them better, but they can't do that easily if some of the colors stick.
I'm using the Accent colors because the alternative seems to be setting an actual RGB color value, which leads to the same problem. I have tried the PowerTools plugin by Eric White, which simplifies the process of updating the charts, but it does not appear to solve the color problem. I may be using it wrong, but I've been unable to find specific info on how to debug color issues.
Thank you in advance for any help.
I'm not sure if this is true for VB.NET and OpenXML, but in the PPT object model, Scheme colors are still supported to maintain compatibility with pre-2007 versions of PowerPoint. New versions use color themes, not schemes. (yeah, I know. Welcome to the BizarroWorld that is PowerPoint).
In VBA, you'd use something like this to set the fill color of the shape referred to by oSh to Accent Color 2 in the current color THEME.
oSh.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent2