colors

Add custom color variables in angular material (2+)

懵懂的女人 提交于 2021-02-18 22:12:06
问题 How to create "custom" own colors for angular material? For example the bootstrap like colors like success (green), warn (yellow), danger (red), beside primary (blue), accent (pink). In other words: Extend the color variablen of Angular Material (2+) for using it in html attributes: <button mat-raised-button color="success">Success</button> or create a white checkbox like: <mat-checkbox color="white">Check me!</mat-checkbox> 回答1: To add a new color named success , make the following changes

Simulate color transparency

十年热恋 提交于 2021-02-18 21:30:32
问题 I have RGB color value and alpha value. How can I get new RGB value assuming that I have white backgound and alpha is applied? 回答1: The formula to be applied to each of the color channels is the following: cr = cf * af + cb * ab * (1 - af) where cr is the resulting color of the pixel, cf is the foreground color, cb the background color, af foreground alpha and ab background alpha. Note that often color values are stored already premultiplied by alpha in which case the formula simplifies to cr

Simulate color transparency

核能气质少年 提交于 2021-02-18 21:30:09
问题 I have RGB color value and alpha value. How can I get new RGB value assuming that I have white backgound and alpha is applied? 回答1: The formula to be applied to each of the color channels is the following: cr = cf * af + cb * ab * (1 - af) where cr is the resulting color of the pixel, cf is the foreground color, cb the background color, af foreground alpha and ab background alpha. Note that often color values are stored already premultiplied by alpha in which case the formula simplifies to cr

plotly - where can I find the default color palette used in plotly package [duplicate]

南楼画角 提交于 2021-02-18 21:13:56
问题 This question already has answers here : How to get Plotly.js default colors list? (5 answers) Closed 4 years ago . I am primarily using the plotly package with r to plot my results. I would like to define the colors I use in my presentation document (tables, headings etc.) based on the default colors used in plotly. e.g. the colors used to fill the bars in a bar chart or the parts of a pie chart. Is there a way to find out the rgb or hex values? see the example here: https://plot.ly/r/pie

Converting a Number Matrix to a Color Matrix in R

独自空忆成欢 提交于 2021-02-18 20:51:15
问题 I have the following 4x4 number matrix containing the numbers 0-4: 0 1 0 3 3 2 1 4 4 1 0 2 3 3 0 1 I would like to understand how to convert number matrices into a color matrices using chosen colors and specific square dimensions (length x width) using R. To be clear, I'm defining color matrix as a figure using colored squares to represent specific values in a matrix orientation. An example 4x4 from another program follows: I would have to assign color codes to the numbers, for example: 0 =

How to change flutter app keyboard color?

…衆ロ難τιáo~ 提交于 2021-02-18 13:56:27
问题 In my flutter , I create a TextFormField, but it's keyboard color is black in iOS, I want to know how to change it to white. flutter language version: >=2.2.2 <3.0.0 this is my code about the TextFormField: TextFormField( style: TextStyle( fontSize: 14, color: Colors.black), autofocus: false, initialValue: 'initial value', maxLines: 1, // onSaved: (String value) => _person = value, // obscureText: _isObscure, validator: (String value) { if (value.isEmpty) { return 'nononono'; } return null; }

Border color of Qt components

£可爱£侵袭症+ 提交于 2021-02-18 12:11:29
问题 I want to change border color of QFrame component. Also tried with style sheet but no effect at run time. In my project there are various Dialog UI are there which are basically QFrame and i want to change the border color of selected dialog i.e. QFrame border color. Is there any workaround for that in QT. As shown below there are two dialog when any one of selected it's respective frame border color should get changed 回答1: Try this: frame->setObjectName("myObject"); frame->setStyleSheet("

Border color of Qt components

霸气de小男生 提交于 2021-02-18 12:09:30
问题 I want to change border color of QFrame component. Also tried with style sheet but no effect at run time. In my project there are various Dialog UI are there which are basically QFrame and i want to change the border color of selected dialog i.e. QFrame border color. Is there any workaround for that in QT. As shown below there are two dialog when any one of selected it's respective frame border color should get changed 回答1: Try this: frame->setObjectName("myObject"); frame->setStyleSheet("

How to colorize the output of Python errors in the Gnome terminal?

隐身守侯 提交于 2021-02-18 00:53:21
问题 Note: I am asking this question after researching how to actually do it. Other questions which are somewhat similar, but actually differ from my question relate to: Color-coding within the python script Importing color libraries within the script Using tools like Solarized to improve tools like Vim to color-code python code. What I am looking for: I already have a simple python script (say, test.py) and I am executing it from the Gnome terminal. python test.py test.py will output some errors

How can I disable Android Lollipop ripple's alpha value?

时光怂恿深爱的人放手 提交于 2021-02-17 21:25:58
问题 I have a ripple working with a custom color. However, the color is never fully opaque. According to the answers from What should be the color of the Ripple, colorPrimary or colorAccent? (Material Design) it always has an alpha of 40%. Looking at the answers I've tried to use the following v21 specific drawable xml to force an opaque red background once selected: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ffff0000">