ant-ribbon are same color and bgcolor in nzcolor? - ng-zorro-antd

my code:
<nz-ribbon nzText="Hippies"
nzColor="pink">
<nz-card nzTitle="Pushes open the window"
nzSize="small"> And raises the spyglass. </nz-card>
</nz-ribbon>
The result
result
I wish the color and bgcolor different.

Related

Unable to give the border color to the checkbox

Hi My objective is to change the color of the checkbox into white color when it is checked, and background color black, i can change the color of the checkbox but i could not see checkbox and tickmark. I've tried to add border for the checkbox but didn't got result as expected.
<Checkbox
checked={this.state.checkedF}
onChange={this.handleChange}
classes={{checked: "checked-display"}}
/>
.checked-display{
color: white
}
Can anyone help me in this query? so that i could get a black tick as well as black border around the checkbox

How to convert rgba value into human readable text

Need to find the button color into human-readable format below code is returning rgba value
Here is my code:
WebElement findbuttonColor = driver.findElement(By.id("color"));
String color = findbuttonColor.getCssValue("background-color");
System.out.println("Button color is :"+color);
I am not sure what human-readable format mean, there are millions of colors which is possible to set for the element. Far not all of them have the names like green, blue, red, etc.
You get the value in rgba because the designer set up the value in rgba. The thing you could do is to define a structure that would map some well-known color codes to rgb (even not considering alpha channel) so that you could pich the "human-readable" format from that map.
Here is the example that might give a clue: Convert RGB values to color name
You can get the element color(Background color of element) by:
element.getCssValue("background-color");
You can get the element text/caption color by:
element.getCssValue("color");
For example if you want to get the background and text color of "Sign in" button for LinkedIn, the code is as follows:
driver.get("https://www.amazon.com/");
String buttonColor = driver.findElement(By.id("searchDropdownBox")).getCssValue("background-color");
String buttonTextColor = driver.findElement(By.id("searchDropdownBox")).getCssValue("color");
System.out.println("Button color: " + buttonColor);
System.out.println("Text color " + buttonTextColor);
When you do getCssValue(), it return rgb value. You can convert it into hex by using below
backgroundColor = element.getCssValue("background-color");
Color.fromString(backgroundColor).asHex();
this returns hex code, something like "#def3ff". You can later compare it with your availbale hexcode in yous css.
Assert.assertEquals(def3ff, ExpectedHexCode);
Note:
You can get hex code of your element by inspecting it > Styles. Refer below screenshot for details
how to get Hexcodefrom
Thank You,

How to remove border in .FillRectangle garphics method in c#

I am using following code to print graphics rectangle
var gr = XGraphics.FromPdfPage(1);
Color color = System.Drawing.Color.White;
var brush = new System.Drawing.SolidBrush(color);
gr.FillRectangle(brush, item.Position.X, item.Position.Y, item.Width, item.Height);
But when I execute above code there is border on that rectangle.That rectangle is in following image.
In this image border is showing when I execute above code, But is there any way so I can remove that border?
How does it look when you skip FillRectangle? I think the "border" is already there and your reactangle is just a little too small.

How to change header border color , text color and background color in QT?

In my application im using tablewidget thats works fine but not able to change border color and background color and text color of the table. I want the "white" border color ,"black" background color and "white" text color for entire table (include cells). I tried the code like,
//
tableWidget->item(0,0)->setBackgroundColor(Qt::black);
tableWidget->item(0,0)->setTextColor(Qt::white);
//the above 2 lines works fine , but how to set cell border color as white
QString styleSheet = "::section{" // "QHeaderView::section {""spacing: 10px;""background-color: green;""color:white;""border: 1px solid white;""margin: 1px;""text-align: right;""font-family: arial;" "font-size: 12px; }";
tableWidget->horizontalHeader()->setStyleSheet(styleSheet);
I tried the stylesheet also but that also not working.Guide me,

Degrafa color changer

<degrafa:LinearGradientFill id="bluedream">
<degrafa:GradientStop color="#6ab5d0"/>
<degrafa:GradientStop color="#388aae"/>
</degrafa:LinearGradientFill>
<degrafa:GeometryComposition graphicsTarget="{[bgCanvas]}">
<degrafa:RoundedRectangle id="color_preset" fill="{bluedream}"/>
</degrafa:GeometryComposition>
I have issue with degrafa code which I have defined a set of different gradients for color_preset.fill to be dynamic change when user select different color in the combobox.
I replaced fill="{bluedream}" with fill="using_variable" and lead to error compiled message: Initializer for 'fill': values of type com.degrafa.core.IGraphicsFill cannot be represented in text.
Is there a solution to use this code as a color changer?
The fill property in your example is pointing to the LinearGradientFill with id "bluedream". You can either replace the fill with a different gradient (or solid or other fill) or change the colors of the gradient fill itself:
<degrafa:LinearGradientFill id="bluedream">
<degrafa:GradientStop color="{your_combobox.selectedItem}"/>
<degrafa:GradientStop color="{your_other_combobox.selectedItem}"/>
</degrafa:LinearGradientFill>
<degrafa:GeometryComposition graphicsTarget="{[bgCanvas]}">
<degrafa:RoundedRectangle id="color_preset" fill="{bluedream}"/>
</degrafa:GeometryComposition>
I haven't run that code, but it should work. The idea is to change the color of the GradientStop with your dropdown's selectedItem (provided that is a string).
This example does something very similar, but with a color picker instead of a dropdown:
http://degrafa.org/source/CS4IconPreviewer/CS4IconPreviewer.html

Resources