If i want to set a colour property to something thats non-standard (i.e. not something like clBlack or clRed) how can i do this? Can i set something like hexadecimal colours?
I'm looking for a function that can accurately represent the distance between two colours as a number or something.
For example I am looking to have an array of HEX values or RGB arrays and I want to find the most similar colour in the array for a given colour
eg. I pass a function a RGB value and the 'closest' colour in the array is returned
Hi I am displaying a colour as a hex value in php . Is it possible to vary the shade of colour by subtracting a number from the hex value ? What I want to do it display vivid web safe colour but if selected I want to dull or lighten the colour. I know I can just use two shades of colour but I could hundred of potential colours .
to be clear …
I want to draw some items on screen, each item is in one of N sets. The number of sets changes all the time, so I need to calculate N different colours which are as different as possible (to make it easy to identify what is in which set).
So, for example with N = 2 my results would be black and white. With three I guess I would get all red,…
I'm making an iOS game using cocos2d libraries.
Lets say you have two objects that have two separate colours - defined in RGB as
Blue: 0,0,255
Yellow: 255,255,0
I want to add blue and yellow to make green.
To over complicate things, let's say that the Blue object is bigger than the Yellow object (for the sake of argument let's say…
I'm sure I'm making some kind of silly mistake here, but when converting a tiff file to PDF, the colours become reversed. I can't figure out why. Here's my code:
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream("Image.pdf", FileMode.Create));
System.Drawing.Bitmap bm = new System.Drawing.Bitmap(@"C:\Temp\338814-00.tif");…
I accidentally managed to get colour names, #HEX, and a colour preview in Emacs-ESS. Don't have a bloody idea how, must've pressed some keybinding or menu item... But, now I can't seem to find where's that feature... I'm quite sure I wasn't hallucinating, so it's gotta be there, under some keystroke that I can't reproduce!!! =)
Thanks in…
I'm using FreeType in order to allow fonts to be used in OpenGL. However, I'm having a problem where I cannot change the font colour whenever I do texture mapping. No matter what I select using glColor3f it will just come out white. The texture works fine.
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glColor3f(0.5,0.0,0.5);…
Hey,
I have a simple Jlabel element with text and icon
setting the background changes the full label colour.
I want to be able to only render the background colour on the text section of the label, ie - to have separate backgrounds/foregrounds for the icon and text. Selecting/deselecting the label will flip the colour…
Hi, i have a loaded image from disk (stored as a BufferedImage), which i display correctly on a JPanel but when i try to re-save this image using the command below, the image is saved in a reddish hue.
ImageIO.write(image, "jpg", fileName);
Note! image is a BufferedImage and fileName is a File object pointing to the…
I am trying to get a specific colour used by Windows XP in my .NET application.
In Windows XP, if you go the Control Panel in 'category view', on the left hand side you have some 'See Also' options (Windows Update, Help and Support, Other Control Panel Options). The colour I'm trying to get is the light blue…
I'm interested in building a heatmap with geom_tile in ggplot2 that uses a different gradient high color based on a factor.
The plot below creates the plot where the individual tiles are colored blue or red based on the xy_type, but there is no gradient.
ggplot() +
geom_tile(data=mydata,…
I have a source bitmap that is 1x1 and I am trying to take that image and draw it to a new bitmap. The source bitmap is all red, but for some reason the new bitmap ends up with a gradient (see image). Using the code below, shouldn't the new bitmap be completely red? Where is it getting the…
I'm an OpenGL newbie. I'm trying to colour 3 circles but only 3 white circles are appearing. n is 3 in this example. Each vertice has 5 points, 2 for position and 3 for color
Here is where I think a problem may lie:
glEnableVertexAttribArray(0);
glBindBuffer(GL_ARRAY_BUFFER,…
Hi I am making a simple 2D game in c++ and for the map I am doing texture mapping by using tiles and assigning textures to those tiles. However, when I run the programme the textures become black and white when I want them to be the colour they are in the .png image. This is my code:
…
I am playing with matplotlib - I have a bar chart, and I want to highlight the bar which user clicks. I have a callback that goes through a rect collection (the one I got from self.axis.bar(...)) and finds out which one was clicked (looking at the coordinates). At this point I want to…
When putting code samples in my blog I would like the code to have all the appropriate colours. How can I do that?
Basically if I write:
foreach (ListItem item in items)
{
item.Text = "something";
}
I want it to appear in the correct colours like it does in my Visual Studio or…
I am using a custom colour scheme in Visual Studio 2008. The annotate bar (that shows who checked each block of code in and when) is rendering in some illegible colours. I can't identify which colours these are within the relevant Options dialog so I cannot change them to something…
I have a custom attribute...
[System.AttributeUsage(System.AttributeTargets.All)]
public class Refactor : System.Attribute
{
private string _message;
public Refactor()
{
_message = string.Empty;
}
public Refactor(string message)
{
_message…
My colleagues mark folders on mac server using their macs, and sometimes tell me i've marked those folders in green. I'm wondering if there's any mean to see what colours got assigned to what folders using PC. I'm connecting to the server using smb/ssh. Solution can be either…
I have a lot of Powerpoint slides that I converted to LibreOffice Impress. The resulting hyperlinks are very faded, very hard to see. I can't seem to find any way to change the colour of hyperlinks as a whole.
Any colour change I do make on an individual url link does not…
This is a mostly insignificant problem, but it's been bugging me for a while and I figured someone on here might be as ridiculously OCD as I am (this is a programmer community after all).
Basically, the problem is that TextMate doesn't seem to calibrate syntax highlighting…
I want to print a table of the colours used in a web page that my graphic designer has produced - I have .png files at present and use Fireworks to view them. It would be great if there was a tool that lets you print a table with the colour and hex value so I can easily…
Hi i'm trying to use a 3d texture in opengl to implement volume rendering. Each voxel has an rgba colour value and is currently rendered as a screen facing quad.(for testing purposes). I just can't seem to get the sampler to give me a colour value in the shader. The…