rgb

Stable random color algorithm

Here we have an interesting real-world algorithm requirement involving colors. 1) Nice random colors: In ordeeing to draw a beautifull chart (i.e: pie chart) we need to pick a random set of Colors that: a) are different enought b) Play nicely Doesnt Look hard. For example u fix bright and saturation and divide hue in steps of 360/N...

Generating a readable colour from RGB?

Hi, I'm putting in a function which will allow a user to input a color (eg: purple) and it will change the look of their profile to be purple. It's interpreted from text into a 'Color' class which stores them inside itself as RGB numbers (int for red, one for green and other for blue). What i don't know how to do is logically turn these ...

How can I convert RGB hex string into UIColor in objective-c?

I have color values coming from the url data is like this, "#ff33cc". How can I convert this value into UIColor? I am attempting with the following lines of code. I am not getting the value for baseColor1 right. Looks like I should take that pound char off. Is there another way to do it? NSScanner *scanner2 = [NSScanner scannerWithStrin...

Converting from RGB to HSL with Objective C

I'm quite new to objective c but have been programming for a while. I started creating a function that would convert from RGB to HSL and back again but I get a feeling it is way too long and headed in the wrong direction. Does anyone know of a simple way to perform this conversion? ...

Opencv: Converting hue image to RGB image

I am trying to show the hue component of the image from my webcam. I have split apart the image into the hue component but I can't figure out how to show the hue component as the pure colors. For example if one pixel of the image was B=189 G=60 R=60 then in HSV, H=0. I don't want the draw image to be the the gray values of hue but the...

Is there any C# library for working with pipes with YUV data?

Is there any C# library for working with pipes with YUV data? or at least with yuv files... So we have programm like FFmpeg or VLC or x264.exe it can give us live yuv pipe or file... so is there any good library for playing with yuv files\pipes - like a yuv file\pipe to rgb file pipe... ...

jquery css color value returns RGB?

In my CSS file: a, a:link, a:visited { color:#4188FB; } a:active, a:focus, a:hover { color:#FFCC00; } I tried with: var link_col = $("a:link").css("color"); alert(link_col); // returns rgb(65, 136, 251) How can I get the HEX code? * edit: found the answer here: http://stackoverflow.com/questions/638948/background-color-hex-to-js-v...

What's the best way to convert a .eps (CMYK) to a .jpg (RGB) with Image Magick

Hi All, I have a bunch of .eps files (CMYK) that I need to convert to .jpg (RGB) files. The following command sometimes gives me under or over saturated .jpg images, when compared to the source EPS file: $cmd = "convert -density 300 -quality 100% -colorspace RGB ".$epsURL." -flatten -strip ".$convertedURL; Is there a smarter wa...

Javascript color gradient

Using javascript with or without Jquery, I need to a create a gradient of colours based on a start and finish color. Is this possible to do programmatically? The end colour is only ever going to be darker shade of the start colour and it's for an unordered list which I have no control over the number of li items. I'm looking for a solut...

A Photoshop Design question from a programmers point of view

Every time I design websites in Photoshop, I slice up the elements I want to bring into my html page. I am experiencing a problem where the css-ruled background colors vary from the same color saved in photoshop. Consider this example: There is a square div with a background color of #080808. In photoshop, I slice up an image that will ...

PHP GD: need to find out an alpha quantity

Imagine this. I have a pixel of color (255,0,0) [red]. No someone painted on it with white color with * alpha. I know the background color, I know with what color it was painted over, I need to get the alpha of the painted over color. How? So far we have: $im = imagecreatefrompng('public/images/bg-tmp.png'); // we need to find a neare...

Get Pixel color of UIImage

How can I get the RGB value of a particular pixel in a UIImage? ...

How to use use cmyk color codes in android?

Hi Everybody, I have an doubt, I don't know how to use cmyk colors in android. If any one knows please help me. I am waiting for your valuable replies. Thanks & REgards Niladri ...

Why are RGB values inconsistent between iPhone and Mac OSX Color Meter (Particularly the Red channel)?

Hello! I'm programming for the iPhone and I have an 3-channel UIImage taken from the iPhone camera. I'm trying to get the RGB values for different areas on this image. I currently cross-reference the RGB outputs I get from the iPhone with the digital color meter that comes with Mac OSX. Most of the values I obtain are fine, however...

Generating gradients from a hexcode or RGB in PHP/jQuery?

Hello, I'm trying to figure out how to write a function that programmatically retrieves a background-color css attribute and creates two outputs (one slightly darker than the background-color, one slightly lighter). The idea is being able to generate a very basic linear gradient from a single color selection. Anyone have any ideas? ...

Can't find error in pixel searching algorithm

Ok, I'm trying to make a program that finds the position of a colored pixel within the desktop. To do this I make a screenshot of the desktop then go through the pixels and search for the one that has the matching RGB as i need. The only problem is that my program returs strange coordonates X,Y for the found pixel... #include <stdio.h> ...

Converting a RGB color tuple to a six digit code, in Python

I need to convert (0, 128, 64) to something like this #008040. I'm not sure what to call the latter, making searching difficult. ...

image format best for display

I am working on an image processing application. I have to display an image sequence. I would like to avoid any extra overhead for {internal} format conversions. I believe RGB should be the optimal format for display. But SDL accepts various YUV formats and there is no native{to SDL} support for RGB. Whereas Qt does not accept YUV form...

How to obtain pixel’s rgb values in an image in iPhone sdk

Hello, I am working on a little side project (program for iPhone platform)and I don't exactly have a problem, but I don't really know where to start. The project I am working on has to do with getting the info and manipulating a pixel's RGB values inside an image. I know this is a very basic program , but I am a beginning iPhone program...

SVG image with CMYK colours - is it possible?

Is it possible to specify that as SVG image should produce output in CMYK? If so, is it a big task? What if the image has its colours specified in RGB, is it difficult to convert them to CMYK? ...