rgb Questions

6

Solved

I'm sure someone has already solved this problem: what is an easy and portable way to convert a hex color value (anything from 000000 to FFFFFF) to 3 decimal values from 0 to 255. (If you're not fa...
Dehypnotize asked 31/8, 2011 at 6:16

7

I am writing an app that takes the camera feed, converts it to rgb, in order to do some processing. It works fine on the old camera implementation which uses NV21 Yuv format. The issue I am havin...
Uranalysis asked 28/5, 2015 at 15:28

5

Solved

In RGB model, each pixel is defined by 3 bytes, for R,G and B respectively. This gives a total of 224 colors, including 256 tones of grey. It is very common to represent HSV/HSB/HSL models with flo...
Daveen asked 24/11, 2012 at 7:56

4

Solved

I am looking to optimise some SSE code I wrote for converting YUV to RGB (both planar and packed YUV functions). I am using SSSE3 at the moment, but if there are useful functions from later SSE ve...
Arman asked 31/12, 2010 at 22:20

16

Solved

I'm trying to write a function to shift the hue of an RGB color. Specifically I'm using it in an iOS app, but the math is universal. The graph below shows how the R, G, and B values change with re...
Odontoid asked 14/12, 2011 at 16:21

8

Solved

If I have a SwiftUI Color: let col: Color = Color(red: 0.5, green: 0.5, blue: 0.5) How do I get the RGB components from col? Like this maybe: print(col.components.red) In UIKit, I could use U...
Lareelareena asked 13/6, 2019 at 17:51

8

Solved

Does anybody know, off the top of your heads, a Javascript solution for calculating the complementary colour of a hex value? There are a number of colour picking suites and palette generators on th...
Frontpage asked 2/11, 2009 at 22:26

6

Solved

In PHP, what is the most straightforward way to convert a RGB triplet to HSV values?
Workingwoman asked 20/11, 2009 at 22:47

3

Solved

I have a list of 20 colors, each is like this (0,0,0)(rgb) but with different values, and i need to find the closest to the color i am giving, for example (200, 191, 231). problem is i am not sure ...
Lobworm asked 17/1, 2019 at 18:33

18

Solved

I want to display a color based on a value from 0 to 100. At one end (100), it's pure Red, the other end (0), pure Green. In the middle (50), I want it to be yellow. And I want the colors to fade ...
Cadwell asked 18/6, 2011 at 6:25

3

Solved

What is the simplest and fastest way to convert an RGBA image in RGB using PIL? I just need to remove the A channel from some images. I can't find a simple method to do this, I don't need to take ...
Vigilantism asked 14/5, 2018 at 13:25

10

Solved

I am using the TweenMax JS library with the ColorPropsPlugin which will tween color values which are specified in many formats, the problem I have is that the result is always in the form of a stri...
Extensor asked 25/10, 2012 at 13:47

6

Solved

In many MATLAB plotting functions, you can specify the color as either a string or as a 3 element vector that directly lists the red, green, and blue values. For instance, these two statements are...
Goldi asked 7/2, 2011 at 14:26

61

Solved

How to convert colors in RGB format to hex format and vice versa? For example, convert '#0080C0' to (0, 128, 192).
Rodl asked 11/4, 2011 at 15:42

17

Solved

I need to convert (0, 128, 64) to something like this "#008040". I'm not sure what to call the latter, making searching difficult.
Mcbrayer asked 1/8, 2010 at 4:22

5

Solved

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 bas...
Vina asked 9/6, 2010 at 21:47

22

Solved

I'm looking for some kind of formula or algorithm to determine the brightness of a color given the RGB values. I know it can't be as simple as adding the RGB values together and having higher sums ...
Gerrilee asked 27/2, 2009 at 19:19

20

I want to design a program that can help me assess between 5 pre-defined colors which one is more similar to a variable color, and with what percentage. The thing is that I don't know how to do tha...
Other asked 26/1, 2012 at 12:20

3

Solved

I want to combine three characters into a short using bit shifting. This is for implementing the RGB565 color palette (where there are 5 bits for red, 6 for green, 5 for blue). Here is my example ...
Haggerty asked 13/7, 2012 at 13:5

11

Solved

This should be a simple question, but I haven't been able to find a way to make it work. Essentially, I have a silly localhost page that I use in my webdevelopment. When I am surfing between our d...
Pictograph asked 2/1, 2009 at 19:25

2

I'm trying to loop through all rgb colours in rainbow order. Currently I have this: int state = 1; int a = 255; int r = 255; int g = 0; int b = 0; if(g < 255 && state == 1){ g++; r--...
Valuate asked 3/8, 2015 at 10:8

16

Solved

I just picked up image processing in python this past week at the suggestion of a friend to generate patterns of random colors. I found this piece of script online that generates a wide array of di...
Bondie asked 11/3, 2015 at 23:25

24

Solved

I am looking for an algorithm to convert between HSL color to RGB. It seems to me that HSL is not very widely used so I am not having much luck searching for a converter.
Detritus asked 28/2, 2010 at 23:58

25

Solved

Using the following jQuery will get the RGB value of an element's background color: $('#selector').css('backgroundColor'); Is there a way to get the hex value rather than the RGB?
Relativistic asked 16/11, 2009 at 7:51

3

Solved

According to http://www.workwithcolor.com/color-luminance-2233.htm, RED (#FF0000) has Luminance: 54%. and light pink (#FF8080) has Luminance: 89%. Our designers like it but how is it determined? Tr...
Hendel asked 30/10, 2013 at 17:33

© 2022 - 2025 — McMap. All rights reserved.