Click here to Skip to main content
15,896,527 members
Everything / Color

Color

color

Great Reads

by Bjørn
Editing GIF colors without touching the image data within
by Chris Maunder
A quick overview and a simple Windows CMD script to make your terminal output a little more lively
by Chris Maunder
A quick overview and a simple bash script to make your script output a little more lively
by dynamichael
Build an oct-tree from a color palette for a fast nearest color search

Latest Articles

by ToughDev
More about ST7735 1.8-inch 128×160 Color LCD on a PIC Microcontroller
by PascalLandau
In the fifth part of this tutorial series on developing PHP on Docker we will setup some PHP code quality tools and provide a convenient way to control them via GNU make.
by Chris Maunder
A quick overview and a simple Windows CMD script to make your terminal output a little more lively
by Chris Maunder
A quick overview and a simple bash script to make your script output a little more lively

All Articles

Sort by Updated

Color 

1 Aug 2012 by _Zorro_
Hi,Is this an ASP.NET question?I don't think you can override your OS controls. The only way I know is by rendering your own control, but creating an input from scratch is going to be a though task because you won't be able to inherit from the TextBox class.You'll need to handle your...
27 Jan 2014 by a4ashiq
Hello there, I need to represent a matrix (2D array) as colors instead of array elements. Lets say, I have a 8x6 matrix as1 1 1 1 2 21 1 1 1 2 21 1 1 1 2 21 1 1 1 0 03 3 3 3 3 03 3 3 3 3 00 0 0 0 0 00 0 0 0 0 0in this there are three sub matrices as...
28 Jan 2014 by a4ashiq
I got the answer from another website for the same question. Here is it
25 Apr 2011 by Abhinav S
This[^] might be possible using the WriteableBitmap class.
16 Feb 2013 by Abhinav S
Color comparison can never be very accurate since there are a number of factors like capability of the scanner to capture brightness, the surrounding light etc involved. You also have factors like alpha correction etc, which although calculable, can make the calculations quite complex.An...
1 Apr 2013 by Abhinav S
Loop through the rows of the datagrid, and basaed on your conditions change the color.For e.g.for(int i = 0; i
22 Dec 2014 by Abhinav S
Try$('.divLocal').each(funct...
17 Aug 2013 by adriancs
An Office 2010 Style Color Picker for .NET WinForm.
28 May 2012 by Adwaitam
HiI am having a DataGrid and need to change the color of the row in datagrid on clicking the Delete LinkButton in Datagrid.Please help.ThanKs.
22 Feb 2014 by agent_kruger
how to make a gradient color out of 2 colors?like in the picture below:-http://www.vanseodesign.com/blog/wp-content/uploads/2012/11/linear-gradient.png[^]
11 Aug 2014 by ahadji_547
hi! i have to do a program with kinect for my senior project and i'm new in doing programs with visual studio.. i follow the instructions of the "Kinect for Windows SDK Programming Guide" but the explanation in one of the example applications of the book is insufficient.. to be more specific i...
3 Apr 2012 by Alan N
There is something odd about the ForeColor property of a read only System.Windows.Form.TextBox which I haven't seen documented, although I haven't looked very hard.I've noticed that a foreground colour change only takes effect after the background colour has been changed once. After that...
16 Feb 2011 by Albin Abel
Hi,There are many ways to achieve this.1) The best way would be using a clustering algorithm with a maximum likelihood function. On the result of it each pixel will have a cluster membership. So in your subsequent search's you only need to search within the cluster members, not all the...
17 Jul 2016 by Andy Point
Android Material Design: Working with Floating Label EditText
3 Oct 2010 by Ankur\m/
That would depend as you may have different shades for Silver.I would suggest you to download tools like Color Picker (Search Google for the links). You can get both RGB and CMYK values of the selected color.BTW, For silver try, C: 0%Y: 0%M: 0%K: 25%Hope this helps!
10 Feb 2012 by Ankur\m/
JawadHafiz wrote:i am using on webform, I tried but did'nt workTry this - lbdetail.ForeColor = System.Drawing.Color.Red;
3 Jun 2011 by Anshul R
Use WPF. Set ForeColor Property.
24 Nov 2012 by anssary2010
How to show your System.Drawing.Color palette
7 Oct 2017 by Arlert
Trying to detect source color after mixing it with another one. What I have tried: For example: A R G B source 255 128 64 64 overlay 204 0 128 128 result 255 26 115 115 After mixing source color with overlay (with normal blending mode), i get the result color. Knowing, that source...
12 Oct 2013 by ASP.NET Community
This article will show you how to create a color selector control that will looks like the image in the right side.   The first thing to mention
11 Oct 2013 by ASP.NET Community
It's a hot topic among web developers that is it possible to change the color of HTML bulletin list? Well, as many says, it's impossible, there is
1 Nov 2015 by ASP.NET Community
Consider a scenario where you want to add functionality to a server control in asp.net of your own. For example you want to change the background
11 Oct 2013 by ASP.NET Community
Gridview control is a customizable and flexible control used to displaydata in tabular format. It has some nice features. But lacks of someclient
29 May 2010 by AspDotNetDev
Excellent question. I believe I have an answer for you.Sort the pixels into 3 lists. Each list would be sorted by the color intensity of a color component (red, green, or blue). Now, make a grid and set each point to store information about where in the 3 arrays that pixel is located. The...
29 May 2010 by AspDotNetDev
Just to add to my previous answer, I thought of another optimization. In each of the 3 lists, you could store sublists. Say you have 10 pixels that have a red value of 0. Then redList[0] would contain a list of those pixels sorted accorded to their green values. So, redList[0][1] would store a...
30 May 2010 by AspDotNetDev
One more thing to optimize my previous suggestion. If you travel 1 color value at a time in all 3 lists at once, then you can keep track of how far you've travelled in the other lists to know what the best possible minimum color you could achieve is. That way, you can use that as an exit...
22 Apr 2013 by assamheart
Crop a photo and signature from an scanned image
19 Nov 2021 by
Image class which contains an array of unique colors with counts used to sort by color and find duplicates.
30 Jul 2013 by azinyama
Good day all!!!I am using ButtonRenderer to create a button.ButtonRenderer.DrawButton(Graphics, ButtonBounds, ButtonImage, ImageBounds, false, ButtonState);My question is how do I make:01. The button borderless;02. Make the button color transparent.Thanx in advance for you...
8 Feb 2016 by B. Clay Shannon
Step-by-step instructions for an easy way to use any color in a C# app
2 Feb 2011 by Babak.B
:) fasttour
22 Nov 2012 by bEGI23
Im trying to get the same MenuStripItem - Backgroundcolor when it is hovered!At ToolStripItems it is kinda blue or azure, but in MenuStrip it is like shining-orange.How to get that color to use it on my Form.Buttons as Background.ColorI tried all colors on my...
21 Mar 2016 by Bernhard Hiller
In Visual Studio (we are using 2013 Professional with Update 5), type names of parameters and variables are shown in different colors depending on their type, e.g.string aString;String anotherString;Is it possible to change the color of "string" to the color of "String"?If it's not...
28 Sep 2012 by BillWoodruff
Custom and Web colors just translate to numeric values in RGB space, the Web colors are named for convenience by MicroSoft: they should look the same everywhere: but, they may not: my monitor may make your purple look rosy :)System Colors means that color used will be based on the user's...
3 Sep 2016 by BillWoodruff
You can set the (entire) Row BackColor or ForeColor directly:YourRow.DefaultCellStyle.ForeColor = Color.Red;You can set a particular Cell's colors by:YourCell.Style.ForeColor = Color.Red;This thread on StackOverFlow contains a number of valuable examples of working with DataGridView Color...
10 Nov 2018 by Bjørn
Editing GIF colors without touching the image data within
5 Dec 2014 by bling
Owner drawn tabs ...http://msdn.microsoft.com/en-us/library/windows/desktop/bb760550%28v=vs.85%29.aspx[^]Process WM_DRAWITEM messages by painting each tab onto the device context. Use SetTextColor to set the appropriate color before drawing each tab.
24 Dec 2014 by Boudi AlSayed
Hi All, I'm just wondering if there is a simple and fast way to get color scheme from an image?? I didn't find any result on the internet after searching for 1:30 hour... I'm not expert at Graphics codes and these stuff, but for my project the method should be very fast because it will have to...
21 Jan 2014 by bowlturner
The simplest is to use a converter, I have a color converter that I use to change the colors of 2 cells based on values in the object bound to the row.You add the converter to the resources and then ...
9 Mar 2017 by Bryian Tan
Check the header.php template under themes/WhatEverYourThemeName folder. Do you have a backup? If yes, restore from backup, then update all the plugins and template to latest and greatest.I would suggest scrap the whole thing and start from ground 0 unless you 100% sure the problem is fixed...
18 Jul 2010 by btap_644
Hi, I was going through the bitmapmixer sample in dshownet samples folder and I noticed that drawing on the video is done by alphabitmap and colorkey bitmap. I would like to know what these are ? what is the difference between them ?Many Thanks
17 Jul 2010 by btap_644
Hi, this is what I am doing, I take the input from a web camera onto a picturebox in C# and draw a rectangle on the video using a mouse. Then I plan to track that particular area(e.g. right eye)enclosed by the rectangle, as the video streams, for instance if the person moves to the right, the...
5 Jan 2017 by Canal Ten Thousand
I have a function which should change the colors in an image to their opposites. Red to green, green to blue, and blue to red. I have thinking and trying for a while now, but I can not get it to work. However, I know that there is not any problem with my code. Because the image does change...
24 Jul 2013 by CAS1224
I'm trying to find out if there is a way for me to change the backcolor of an individual datagridviewcell to red if the cell contains a certain value. For example: If (columnindex = 1) Then Dim cellData = DataGridView1.Rows(rowindex).Cells(columnindex).Value If...
3 Jan 2015 by CharlesMitchell
You might try setting your Textbox enabled to false instead. You can still cange things how you want.
30 Jan 2013 by Chen.shaohua
View each color in System.Drawing.Color
21 Jul 2011 by Chris H.F. Tsang
Drawing Polylines by tessellation with joints, caps, feathering and per- vertex color
7 Apr 2022 by Chris Maunder
A quick overview and a simple bash script to make your script output a little more lively
7 Apr 2022 by Chris Maunder
A quick overview and a simple Windows CMD script to make your terminal output a little more lively
23 Jul 2015 by ChrisCreateBoss
I'm working on winForms C# 2.0.I want to change the backcolor of my menustrip. It looks as simple as writing menustrip1.Backcolor = Color.FromArgb(38, 37, 37); but I'm having two problems:1) all toolstripmenuitems are still with the control backcolor. (I already set their backcolor one by...
23 Nov 2009 by Christian Graus
What format do you use ? jpeg is lossy, and the colors in a JPEG will change.
26 Aug 2010 by Christian Graus
Does this work ? In C# you need to divide by a float ( 255.0 ) to get a float value. Then you need to decide, do you scale all your values, so if you have a value of 2.0, any 1.0 becomes .5 so they stay in proportion, or do you just say if R > 1.0, R = 1.0.Your English is just fine.
7 Feb 2012 by Christian Graus
ToString() will surely work ?
12 Jul 2012 by Code-o-mat
How about updating the image itself? So when the color changes you update parts of the image with the new color as needed and then make the button redraw itself.
15 Feb 2012 by code_az
Hi, I have the following code for a text displayed in excel cell. Pass_indicator
6 Dec 2012 by codeninja-C#
string hex = "0x333366";int r = Convert.ToInt32(hex.Substring(2,2),16);int g = Convert.ToInt32(hex.Substring(4,2),16);int p = Convert.ToInt32(hex.Substring(6,2),16);--SJ
1 Jul 2010 by CPallini
Not sure I got you, anyway, you may do something like:enum { WHITE, CYAN, ... COLORS};COLORREF color[COLORS];color[WHITE]=RGB(255,255,255);color[CYAN]=RGB(0,254, 255);... :)
28 May 2012 by CPallini
Supposing you are working with Windows Forms, then you may iterate over all controls and apply your logic to all the found labels. See, for instanceHow do I iterate controls in a Windows Form App?[^] at Stack Overflow.
8 Nov 2013 by CPallini
Use a class member to store such a variable, for later retrieval.
12 Jun 2014 by CPallini
See, for instance: "Generating gradients programmatically?" at Stack Overflow[^].
5 Sep 2017 by CPallini
It looks that OpenCV actually use BGR: Why does OpenCV use BGR color format ? | Learn OpenCV[^]. The linked page offers insight on historical reasons behind design choices.
8 Aug 2013 by cpquest
Hi community,I am developing a Application which has a Datagrid. which will be Cell colored based on the below condition.1. There will be a status field in the collection binded to the datagrid. which has values ( Passed , Failed , Waiting) for which Passed will be colored as Green,...
1 May 2012 by CrankyMero
Hello EveryoneSo I have 2 datagridviews that compare information between them and if it does match it colors the rows in green and after its done all the white spaces colors the rows in RED, so the main thing is that i dont know how to print only the RED rows.This is the method that i...
11 Jul 2012 by cyborneo
Dear all Senior Programmer,hello, could you show me the link or source code to save and retrieve the color in datagridview ?Does anyone knows how to do that ?I want to store a color in a DataGridView(DGV) (that has been selected by the ColorDialog). The DGV saves to a flat file...
6 Aug 2012 by cyborneo
Dear My Friends of Senior Programmer,Please Help me, my Problem is cannot retrieve and load the color from my XML file into datagridview (EVENT: FORMTES3_LOAD). the application isn't error but the display of my Datagridview become irregular.below is my FULL Source Code:Note : the...
22 Apr 2014 by czmn
Hello, i'm new on this site and i try to learn C#.I have a question about the four color problem. I need to do an aplication that simulate the four color maps in win forms. I know how to do in console application using backtracking, but i tried to do in win form using the same algorithm but i...
24 Nov 2009 by Dan Neely
I have some bitmap images being displayed in a DataGridView's and on custom controls.  These are all basic lineart type images not pictures.  I recently noticed that they all looked slightly faded/washed out and when I examined screenshots I took I discovered that any color channels that should have
24 Nov 2009 by Dan Neely
I ended up tossing the image stream and getting the images from the Resources.resx file instead.  Slightly more work; but this means that the images will always be accessed from the originals in source control and that any changes to the images will be automatically included in the next build.
20 Aug 2012 by Dave Crump
Hi all,I am trying to set the Textbox control's color in runtime like;TextBox1.Foreground = Brush.White;I get an Error: 'System.Windows.Media.Brush' Does not contain a difinition for 'White'The Code is:using System;using System.Collections.Generic;using System.Linq;using...
12 Nov 2022 by Dave Kreskowiak
Quote: The reason that makes it break is that all the characters i use to make the ANSI codes work are being treated as just normal characters when i use the string .length property. That's because, in the terms of a string, they ARE normal...
10 Mar 2010 by DaveAuld
You have given very little to go on to allow someone to answer.You need to be very specific in your request and be clear on what exactly the issue you are seeing is.
14 May 2010 by DaveAuld
You have basically written the rules above.You want a matrix of cells, you will need to know what cell you have selected, and then analyze the cells around for valid moves.Nobody will just write code for you, you will need to start yourself and when get stuck on a problem come back and...
11 Jan 2013 by David_Wimbley
Here is a snippet to change the color Red to the HTML outputusing System.Drawing;Color colorRed = ColorTranslator.FromHtml("Red");Console.WriteLine("colorRed: " + colorRed);string htmlHexColorValueThree = String.Format("#{0:X2}{1:X2}{2:X2}", colorRed.R, colorRed.G,...
3 Apr 2012 by dbrenth
Some things are much easier done in code behind. You can set up a LoadingRow event on your data grid. Then, in the event, set the row background based on whatever criteria you want.Good Luck
6 Dec 2012 by Deenuji
Actually i'm using color extender to pick the color in asp.net...but while i'm picking the color it generate the hex decimal values....but i need only rgb values...Pls any one guide me....
7 Dec 2012 by Deenuji
Solution:Write this coding in button or whatever... System.Drawing.Color MyColor = System.Drawing.Color.FromArgb(val);
12 Dec 2012 by Deenuji
Actually i using color extender tool to generate the colors....while i'm picking the colors, this tools return only hexadecimal values ...but i need to generate color name too...How to generate color name from this hex or RGB values????
21 Jun 2016 by derstine
Hi, i am having a hard time assigning a color value to a drawing. What i am trying to do is pick from a comboBox value which has a color values.foreach (System.Reflection.PropertyInfo prop in typeof(WebSupergoo.ABCpdf10.Drawing.Color).GetProperties()){ if...
17 Mar 2010 by dharshinicpriya
hello everyone.. I have just started learning vc++ and mfc. Im creating a simple project with Dialogbar. my question is how to set background color for the dialogbar. Plz help me out of this. thanks in advance.
22 Mar 2013 by Dheeraj Singh Bhadoria
This Artical shows that how we can change the color of any image throw Bitmap
15 Jul 2012 by Douglas Smallish
Demonstrates how to code a Silverlight Chart ControlTemplate Programmatically.
13 Jun 2015 by DrABELL
Pure HTML5 modal pop-up box ("darkbox") implemented via CSS 3
16 Dec 2012 by dragon9098
1.void __fastcall TForm1::Timer1Timer(TObject *Sender) 2.{ 3. if(0.0055 SeriesColor = clRed; 6. AreaSeries2->AddXY(n,Number); 7. } 8. else 9. { 10. AreaSeries1->SeriesColor = clLime; ...
6 Jun 2015 by DrgIonuţ
I have a server-client application, but my task now is to fill a square of a rectangle when I click it. How can I do this?using System;using System.Windows.Forms;using System.Text;using System.Net.Sockets;using System.Threading;using System.IO;using System.Collections;using...
19 Dec 2019 by DrgIonuţ
I have a SVG external file which is called in an tag. The SVG contains two groups.
25 May 2019 by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
27 Apr 2022 by Emmett O neill
Hi I am creating a Rubik's cube detection program for OpenCV in order to detect the colour of each individual cubie however i am struggling to tell the difference between colours such as red, orange and yellow. I have investigated this throughly...
17 Mar 2010 by Eugen Podsypalnikov
You could implement a reaction on WM_ERASEBKGND for your bar :) :...BEGIN_MESSAGE_MAP(CYourBar, CYouBarBase) ON_WM_ERASEBKGND()...END_MESSAGE_MAP() BOOL CYourBar::OnEraseBkgnd(CDC* pDC){ CRect cClientRect; GetClientRect(cClientRect); pDC->FillSolidRect(cClientRect,...
14 Aug 2020 by Fa3o
Hello.Well, I have a form loaded with lots of (Label/TextBox)s, and i have a color switch option in the form, And I'm using the simple code which is this: TLab.ForeColor = My.Settings.B HLine1.BackColor = My.Settings.B HLine2.BackColor = My.Settings.B ...
16 Apr 2011 by Fabio V Silva
You're using the same geometry object for all the Path objects, the last one will stay on top of the others and you will only see that one which is making you think that all the Path are using the same colour.
21 Jan 2014 by fahood12
Hello,I need to make a multicolor in a single cell based on cell value in WPF datagrid.For example:I have a column which header is "InitialNames" and another column with a header "Available"Let's say that it contains for example the following:InitialNames ABC/BD ...
21 Jan 2014 by fahood12
Thank you for your replyyour suggestion will change the color for the cell but I want to use multicolor in single cell.the following table will make it easier to understand:If available column as below:Available0/10/0/011/0/10/0The InitialName column will be as...
16 Feb 2018 by faiqaa
I am saving stock details including product ID,product name,price and quantity into a text file and then displaying this information in a list box, each row consists of the details I've listed above. Now my aim is to highlight in red the quantity of the product only if the value is below 5, so...
18 Jan 2015 by Fandango68
I have a Web.SiteMap file with several menu items in my web application, such as...
18 Jan 2015 by Fandango68
I've answered my own question.In the TreeView tag, use the DataBound event to loop through the nodes, find the node you want using node.Text, and apply a SPAN tag with style="" to control formatting.ie:protected void Tree_DataBound(object sender, EventArgs e){ try { ...
27 Mar 2014 by FarhanShariff
How to set Multiple background colour in charthttp://imgur.com/uejGnUF[^]
3 Mar 2016 by FatzBomb
Michael presents a very good solution. However, you can shorten your code if all of the controls are of a certain type using the OfType(Of Type) parameter. Labels are not Container Controls so the recursive function below is pointless, but you can use it for any control type you want.' Put...
28 Sep 2012 by footballpardeep
Where to use which color system(Custom colors,Web colors, System colors).What i know about it is(custom colors have some exact value, that will be same for every system and System color will vary from system to system if we will use it in our application, i don't know about web colors.)(Is it...