Questions tagged [colors]
Use this tag for questions about representing or manipulating colors in a programming language.
21,768
questions
0
votes
0
answers
19
views
In karyoploteR, how can I color specific cytobands based on their names?
I would like to ask for some help in using karyoploteR.
I am trying to plot some custom genomes with custom cytobands. I want to color each region based on the names. Unfortunately, I was not ...
1
vote
1
answer
35
views
Color xticks to match color of scatter plot points
Here is my plot:
generated from the python code
import numpy as np
import matplotlib.pyplot as plt
plt.figure(figsize=(20, 10))
n = 70
x = [f'{i}{val}' for i,val in enumerate(np.arange(n)[::-1])]
y =...
0
votes
0
answers
19
views
Handling color in a image buffer
Many years ago, I wrote a Swift application on macOS that draws the Mandelbrot Set. Some days ago, I decided to rewrite that app and improve it after all this time (I’m not a Swift programmer and I ...
0
votes
1
answer
6
views
change color of squarespace calendar event based on event title
I am creating a caledar of events in Squarespace. I already know how to change the colors of the dates that have an event on them. However, I'd like to change the dates where the specific title of the ...
0
votes
0
answers
11
views
Implementation/algorithm to approximate AE white balance (temp/tint) in a shader
I'm trying to figure out the implementation/algorithm behind Adobe After Effects' Lumetri Color white balance controls to create a similar or approximate version in a GLSL shader. Specifically, I'm ...
0
votes
0
answers
15
views
R plotly, impossible to use the color parameter and have the text at the same time
I have a plotly barplot in R but I can't manage to keep the colors of the bars by group and at the same time add the text at the top of the barplot. I've tried replacing the "color" ...
1
vote
1
answer
44
views
Getting Colour from HTML Element
I'm trying to create a re-usable component on my Blazor Application, that allows another developer to input one colour (for the background), and then colour when rendering the component will calculate ...
0
votes
1
answer
27
views
Color column and exclude NA with ggplot2
I would like to color a column but render the NA values one specific color with ggplot2 please.
If we take the world dataset from the spData package.
library(sf)
library(spData)
library(ggplot2)
set....
0
votes
0
answers
8
views
Mantine Primary Color
I want to know the Mantine primary color properties so that I can just change the primary color of all components in the theme object:
const theme = {
fontFamily:
'Inter, -apple-system, ...
0
votes
1
answer
19
views
Apply different colour gradient on same plot and same variable, but different dataframe
I am working on a model and I am testing its sensibility. To represent it, I would like to represent on the same plot different results of the model when I change one parameter. But to distinguish my ...
1
vote
1
answer
96
views
How to convert a Color to KnownColor name?
tried this:
in the List<Color> colors there are many different colors over 39,000 and the first item for example is:
{Name = ffcecece, ARGB = (255, 206, 206, 206)}
and now I want to convert the ...
0
votes
0
answers
39
views
How can I capture in VBA Excel the event when the user manually changes the background color of a cell?
There is no conditional formatting involved, just manually change of the color. There is an event to capture for changing the cell's value, but no event for changing color.
I found related info here, ...
0
votes
2
answers
49
views
How to stop text from wiping background color with NavigationStack?
New to swift and stuck at the starting line...
I am simply trying to fill the whole background of a page using gradient. I have seen this is possible using ContainerRelativeShape() so have tried and ...
0
votes
0
answers
30
views
Color differences between text and .png image on Samsung browser [closed]
Screenshot from Samsung browser
While building a website for a client they noticed that the Colors on their Samsung browser are wildly different from the logo in the top right. On every other browser ...
0
votes
1
answer
30
views
How to change enemy's colour when it spawns? Unity2d
When I try to put ChangeColor() function in Spawn() or in Coroutine, enemies stop spawning.
I made an array of a few colours in unity, one of those should be randomly picked up and enemy's colour ...
0
votes
0
answers
14
views
How to change bottomNavigationView selected item's background ripple
I am new to Android development. I want to change the background colour of a selected icon from the bottom navigation view but have failed to do so. I searched a lot on Google, but I failed to get ...
0
votes
2
answers
29
views
How do I convert RGB values to the closest ANSI color code?
I'm trying to convert image data into a format printable in a console, which has very limited colors. (This is being done in python 3.12)
The colors that I'm using are the base red, green, blue, ...
0
votes
0
answers
25
views
How do I let randomized colors differ by 40° per phase to all other stimuli in R?
I want to create a stimulus list for a study. This will show at most 5 stimuli in a single phase with randomized colors. These color should differ by atleast 40° to all other stimuli in the phase. ...
1
vote
1
answer
51
views
Patterns in filled contours and striped colors in R
Let me introduce you my big problem: I have to create two filled contour graphs and then overlap them in order to show where intersections happen. In order to be clear, I'd need to use "stripes&...
1
vote
1
answer
19
views
Modifying the colors with commands scale_fill_manual() and scal_fill_discrete() on a ggplot2 histogram
My data frame (df) consists of two columns, one with random values (continuous measurements) and another with three levels (c1, c2, c3):
df <- data.frame(col1= round(rnorm(150),2),col2 = c(...
1
vote
1
answer
35
views
Convert RGB values to a ConsoleColor (C#)
So I wish to build an ASCII Renderer, that takes an image and converts each pixel to a character. However, I thought it would be cool if I could also get Color values as well, not just white ...
1
vote
1
answer
36
views
truncate colour pallete with ggplot2 and geom_spatraster() in different layers
I want to be able truncate the colour pallete for certain values of a raster using ggplot, which I am able to do using basic plotting of the terra object, but not with ggplot2.
This is what I have ...
0
votes
0
answers
24
views
Setting a different cell color causes previous original color cells to switch to the new cell color in the xlnt library
I have some code that gets called when new items are added to a spreadsheet using xlnt that sets the new cells to a green background.
void SBOMUpdater::insertNewComponent(workbook& wb, const ...
0
votes
0
answers
36
views
The seaborn doesn't display the correct color when I have set the RGB hex code [duplicate]
I have run the following code in the Ubuntu server with Jupyter notebook. I actually want the color to be '#3a923a', but it appears to be '#458745'. Can someone help me?
import seaborn as sns
import ...
0
votes
0
answers
14
views
Calculation of fixed background colors suitable fro transparent image
I really have a problem, where i don't know how to solve it.
I'm using python at the moment, but this should not matter for this case.
I have got a list of fixed background colors and I've got an ...
0
votes
0
answers
21
views
Different results for ColorScheme in Flutter?
I try to get the dominant color from the web image, and for it I use the fromImageProvider method from the ColorScheme class. However I got two different results on iOS and on the web flutter platform....
0
votes
0
answers
24
views
How to change color of the <DropdownList> (from react-widgets) placeholder text?
<DropdownList
data={baseYearDropdownOptions}
containerClassName={classNames(styles.dropDownList,
'custom-react-dropdown')}
...
0
votes
1
answer
21
views
Scale colour over multiple graphs
I have this function that plots data along two axes, and colours them according to their distance to the diagonal:
def scatter_diagdistance(x, y) :
z = abs(y-x)
fig, ax = plt.subplots(dpi=200)
...
-2
votes
0
answers
45
views
Should I create color cube linspace of size 256 or 257? [closed]
I got color .cube file of size 33x33x33 and need to interpolate it to 256x256x256 LUT.
The corrdinates of cells in the input table (by each axis) can be expressed by np.linspace(0, 1, 33)
which ...
0
votes
0
answers
17
views
Visual Studio Textmate scope set color/appearance
I'm creating a new language for my new project (describing movements).
The language is quite defined, and works well. But to write/edit the description-data ("*.tzt", new invented), I'ld ...
0
votes
0
answers
11
views
WCAG Color Contrast Checker errors/warnings about things that are not on page. How to find and fix?
I'm using the WCAG Color contrast checker extension for Firefox. I have fixed most errors, but some I cannot find.
How do I find and fix the things it says are hidden? What does it mean by hidden?
For ...
0
votes
0
answers
8
views
How to change differnt treeviews headers different colors
I have 3 different treeviews in 3 different windows, the last window opened by the second window, and the second window opened by the first, and what I'm trying to do is change the header row color ...
0
votes
2
answers
38
views
How to set label color for Slider in flutter?
Is it possible to set label color different to active color? I tried a lot of options (see below) but nothing works.
import 'package:flutter/material.dart';
void main() {
var themeData = ThemeData(
...
0
votes
1
answer
43
views
How to access parts of the cv2.matchTemplate function to properly adjust intensity and contrast of my input image
I am trying to do template image matching using the cv2.matchTemplate. However, my image has changes in intensity and contrast compared to my template due to lightning conditions (They have been taken ...
0
votes
1
answer
40
views
Is there a way to select the brightness of a color from a palette based on just the color name in tailwind?
I'm trying to make a button with different variants, but I'm interested in whether there is a possibility to just determine which color will be used, and for the default classes to be only which color ...
2
votes
3
answers
87
views
How to set color in the Theme to primary in flutter?
I want to set a color in my Theme to the primary color.
When the primary color changes, so should the other color.
I know how to assign a hardcoded color to any color in the Theme.
But I don't know ...
2
votes
2
answers
42
views
How to determine text color in flutter?
I want to find out the color of AppBar text:
import 'package:flutter/material.dart';
void main() => runApp(const MaterialApp(
home: MyHomePage(),
));
class MyHomePage extends ...
0
votes
0
answers
8
views
eror in onBindViewHolder when trying to setColor using a variable inside an Adapter
at com.example.aplikasiku.AdapterProdi.onBindViewHolder(AdapterProdi.kt:24)
at com.example.aplikasiku.AdapterProdi.onBindViewHolder(AdapterProdi.kt:13)
this is the contents of my adapter
I called the ...
0
votes
1
answer
48
views
Change bar colors in grouped bar plot built in a loop
How can I change the colors of the bars in the bar plot?
species = ("Adelie", "Chinstrap", "Gentoo")
penguin_means = {
'Bill Depth': (18.35, 18.43, 14.98),
'Bill ...
1
vote
1
answer
23
views
Manually add a key and text label in the legend for data repeated in all facets
I'm trying to add a key and a text label for certain data that I want repeated in all facets. First, I followed the procedure read in this forum to repeat certain data in all facets without creating a ...
1
vote
2
answers
32
views
How to smoothly encode 2-dimensional location by colors
In a few webpages (link1, link2) I have seen people filling 2D planes by colors:
However, these examples are given without source code. How can I generate plot like this in Python? Specifically, if I ...
2
votes
3
answers
80
views
Can I create color struct that works on different endians?
I am trying to create a union to store my color values channel by channel and 4-byte values at the same time. But I am having problems with the order of channels. Different endian machines give ...
0
votes
1
answer
102
views
How can I write coloured ASCII characters directly to the console's buffer?
I am a student that has become quite interested in the C++ language and I am currently working on a little project involving printing large number of coloured ASCII characters on the Windows Terminal ...
2
votes
2
answers
40
views
Use data-theme variable value in css
I want to store a hex value of color in data-theme attribute like
document.body.setAttribute("data-theme", "#a20000")
How do I use this value in CSS file like following
...
0
votes
1
answer
32
views
How can i detect what color a mouse pointer is over in JavaScript in order to reset a game?
I am currently creating a cursor-maze game where the objective is to traverse through a randomly generated maze with your cursor, if the user touches the randomly generated walls (Trying to identify ...
0
votes
0
answers
32
views
How to improve view of outlinedbutton in compose?
I have problem with darkmode and my background when I click on element and it is focused.
I can't find which of this change this background of E-mail text label?
class TextFieldColors internal ...
1
vote
1
answer
61
views
change background color in open3d.visualization.draw_geometries
I want to change the background color in Open3D when I draw geometries using open3d.visualization.draw_geometries, but I can't figure out how to that, as the documentation is not showing how to do it.
...
0
votes
0
answers
86
views
Dominant wavelength calculator from chromaticity coordinates
is there any function, or library, preferably in c#, that could calculate the dominant wavelength of a color, using ONLY the x and y coordinates as input?
I have learned how the process goes, that you ...
-1
votes
0
answers
13
views
Latex:Use section titles as color input for cellcolor in table
I have written the following code in Latex:
\definecolor{free time}{RGB}{75,175,234}
\definecolor{work}{RGB}{255,253,84}
\definecolor{eating}{RGB}{246,193,66}
\definecolor{self care}{...
0
votes
1
answer
31
views
Pine script box/label too thick/vibrant. Possibly duplicate stacks?
The boxes and labels generated by this code:
TKO = #e91e63
TKObg = color.new(#e91e63, 90)
LDN = #2157f3
LDNbg = color.new(#2157f3, 90)
NYC = #ff5d00
NYCbg = color.new(#ff5d00, 90)
box.new(...