How to set a specific background color in a column in a matrix? - powerbi

I have a matrix with the next fields:
It’s very hard to navigate; when expanding, the folder paths can be confused with names…
How can I set the background color for the first 5 columns to yellow? (which correspond do the background color).
(Ideally it should look something like):
(My goal is to then add a legend that says ie: Background color Yellow=Path, white=user, access).
Most of the conditional formatting I have seen it plays with numbers, but unfortunately all my data is just text.

Related

How can I emulate this color loop effect?

The title of this question isn't great at explaining what I want to do, so have this gif of the effect I want to emulate: https://i.imgur.com/zRqTSqf.gif (quality of the gif is shite, ik, please bear with me)
I think I need to use the LoopOut() expression for well, the loop, but I don't know how to animate the colors like that. Do I assign different colors in a shape? I'm fairly new to motion graphics, so I'm not familiar with technical terms and all that. Any help/guidance is appreciated!
I would recommend the following:
Create the square shape you are looking for, as a shape layer with a stroke and no fill
Duplicate the shape layer, for example, 4 times
Apply the Trim Paths effect to these layers and distribute it as you wish (for example, if using 4 layers first one from 0 to 25, second one from 25 to 50, third 50 to 75 and fourth one 75 to 100%.
Set a different color for each layer
Create a new Null Object and assign the Slider Control effect to it
Set the Trim Paths Offset property to be driven by the Slider property of the Slider Control (using the pick whip from each layer)
Animating the Slider property of the Slider control in the Null Object, driving the color of all the sides.
Use masks to fix the possible glitches on the vertices and to make it look nice
you can then alt-click on the stopwatch of the Slider property inside the Slider Control of the Null Object and type LoopOut(). Make sure that the first and last keyframes are correct so once the looping is activated the end is the same as the beginning and you should be good to go!
I think this should more or less point you in a possible way of solving it, let me know if you need more help!
In Illustrator, draw a square with a stroke, no fill, and rotate it 45 degrees. And on a separate layer, draw 6 triangles in the desired colours. Example below:
Save as an AI file. Import this artwork into After Effects, setting Import Kind to Composition.
Set the composition length to 4 seconds.
Set the track matte for the triangles layer to the Alpha Matte of the square layer. (#1 in the above)
Open the rotation property of triangles, set a key frame on frame 1, then go to 4 seconds, and set a key frame of 1 rotation. (#2 in the above)
Precompose these layers, then apply a CC Light Burst 2.5 effect for the glow.
Result is as below.

Using OpenGL together with Qt Data Visualization

I'm trying to render a 3D bar graph using the Data Visualization library of Qt. The application I want to develop requires that bars that are in different ranges must be colored with a different color. To make things more concrete
1) Yellow if value <=5000
2) Red if value between 5001 and 15000
3) Blue if value above 15000
However Qt's libraries do not allow me to color the bars with different colors. The class QBar3DSeries has three different options for the color style.
1) Q3DTheme::ColorStyleUniform : All bars are colored with the same color. This is out of the question.
2) Q3DTheme::ColorStyleObjectGradient : All bars are colored with the same gradient. Again this is out of the question.
3) Q3DTheme::ColorStyleRangeGradient : This could be a temporary solution. The bars are colored according to the ratio of the value of an individual bar and the value of the highest bar. But here, the bars are displayed in gradients and more than one color is used and I just want one color for each bar. And it is based on the relationship to the largest value, not on the values I want to specify. (In this example 5000, 15000 and 20000)
Maybe I will need other methods to intervene in the process by which the system renders the graph. Can I use OpenGL to do this? (Which means a lot of work, I don't know much about OpenGL)
Any help is appreciated. Thanks.

1D random black and white mask in Inkscape

I have been trying to create a random black and white mask like the following in Inkscape without success:
My nearest try has been to use black as initial color for the clones, 100% of change of color lightness for each column and alternate the sign of color changes. The result is this chessboard-like mask
The randomize option does not work because it randomizes the color property and not the "index" of the clone whose color is to be switched.
Note: Although my first approach was through the user interface, solutions using the scripting capabilities of Inskcape are also welcome.
I tried the following approach:
Make an original tile with undefined color (shown as ?)
Make a row of tiled clones, with initial color black, and 100% random light component. This will result in a row of random gray levels.
Group all the tiles together and select the group.
Apply the extension Color->Black & White to turn those grays into either black or white.

How can I calculate a THIRD color given a foreground and background color?

I am re-asking this question because my first attempt was erroneously marked as a duplicate, and I still have hope that someone might have an answer for me.
I am having to write my own mouse-over code for a particular control in a C++/VCL application. The question is, given ANY combination of foreground and background colors, how do you calculate a highlight color to indicate that the mouse is over that control?
I am NOT asking how to choose a font/text color based on the background color. That question has certainly been answered. What I need to do is choose a third color to use to highlight the item when the mouse is over it.
I was thinking I probably want to do something like take the background color, find its opposite on the color wheel (and I have no idea how to do that). If that color is too close (however you determine that) to the text color, make it lighter or darker.
Does anyone have an algorithm they are willing to share?
Thanks!
If you want to find the complementary color (opposite on the color wheel), you can convert the foreground color to HSV space (or any of a number of other color spaces such as Y'CbCr, Y'IQ, etc.), rotate the hue component 180° and convert back to RGB.
As you suspect, this might not work if the background color is too close to the resulting color. That gives you some options, though. If you convert both colors (fg & bg) to HSV, you can find 2 colors with hues that are exactly between the foreground and background colors. Just find the angle midway between the 2 input colors' hues to get the first possible color, and then add 180° to that to get the other possible color.
But the bigger question is why you're trying to set the selection color at all? You should be using the system highlight color unless you have a really good reason not to.

Calculating a gradient fill's start and end colours given a base colour

I have a WTL C++ application and I want the user to be able to select different colours for some of the UI elements and apply a gradient fill using the GradientFill API call. However, instead of letting the user pick the start and end colours for the gradient, I'd like them to be able to select a 'base' colour and for my application to calculate suitable start/end colours automatically. I want to end up with a fill that is similar to the one Windows uses for various themed elements. The base colour could be the 'middle' colour of the gradient with my application somehow computing a slightly lighter colour for the gradient start and a slightly darker colour for the gradient end. Alternatively I could use the base as the start colour and compute the end or vice-versa.
I'm sure this would be relatively easy with some RGB macro magic but I really don't know where to start. Any ideas would be welcome.
The RGB color space is not suitable for this. Use HSL or HSV: it is easy to auto-generate a good looking gradient by varying an individual component. Converting from HSL/V to an RGB triplet you can use in the API is simple.