hsl

HSL in .net

What tools have you used for working with HSL colors in .net?...

hsl color problem in Firefox

Hi Guys, I am trying to declare the border of a div using hsl() like this: border: 2px solid hsl(0,200,105); I am using Firefox 3.5 and there is no border being rendered at all. The same code works perfectly if hsl() is replaced with rgb() I read somewhere that Firefox supports hsl() and hsla() Am I doing something wrong? and if h...

HSL Interpolation

If the hue component of my HSL color is in degrees, how can I correctly interpolate between two hues? Using (h1 + h2) / 2 does not seem to produce desirable results in all cases. Here are two examples that illustrate why: Let: red = 0° yellow = 60° blue = 240° (red + yellow) / 2 = 30° (orange) (yellow + blue) / 2 = 150° (blue gree...

linearRGB conversion to/from HSL

Does anyone know of a way to get HSL from an linearRGB color (not an sRGB color)? I've seen a lot of sRGB<->HSL conversions, but nothing for linearRGB<->HSL. Not sure if it is fundementally the same conversion with minor tweaks, but I'd appreciate any insight someone may have on this. Linear RGB is not the same as linearizing sRGB (whic...

convert HSL or HSV to RGB via jquery

Hi, I'm looking to generate random "similar" colors using jquery. It is my understanding that the best way to approach this is using HSL or HSV, according to this question. The issue is I can't seem to figure out how to either… Use HSL or HSV with jquery; or Convert HSL or HSV to RBG via jquery I found this color library, but ...

Why doesn't this Javascript RGB to HSL code work?

I found this RGB to HSL script over at http://www.mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript. I can't find any other small decent ones. The issue is that this code doesn't even really work. Would anybody know why? (I don't know a bit of color math, but maybe it's returning the complem...

HSL to RGB color conversion

Hi I am looking for a tool to convert between HSL color to RGB. HSL is not a very widely used so I am not having much luck googling for a converter. If you know of one, or an easily implementable algorithm it would be much appreciated. ...

Colour Name to RGB/Hex/HSL/HSV etc

Hello all, I have come across this great function/command. Colour to RGB, you can do this: col2rgb("peachpuff") //returns hex It will return one hex value. I want to extend this using Perl, Python or PHP but I want to be able to pass in, for example, "yellow" and the function returns all types of yellows - their hex/rgb/?/etc value. ...

How can I use the HSL colorspace in Java?

I've had a look at the ColorSpace class, and found the constant TYPE_HLS (which presumably is just HSL in a different order). Can I use this constant to create a Color from hue, saturation, and luminosity? If not, are there any Java classes for this, or do I need to write my own? ...

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? ...

Tinting Towards or Away from a Hue By a Certain Percentage

I'm trying emulate the Tint Effect of Open XML. What it does is change the hue of pixels in an image by shifting the hue. It takes 2 parameters: 1) the hue (in degrees) and 2) the amt (the amount, a percentage). It is #2 that I'm having issues with. The spec states: Tint: Shifts effect color values either towards or away from hue by ...

Convert HSB color to HSL

Ho do I convert HSB color to HSL? Photoshop shows HSB color in its color picker. HSL color can be used in CSS. I tried this JS: function hsb2hsl(h, s, b) { return { h: h, s: s, l: b-s/2 } } But hsb2hsl(0, 100, 50).l == 0 instead of 25 Update: Can I do that without converting HSB → RGB → HSL? ...

RGB value to HSL converter

Google maps api v3 allows "styles" to be applied to the map, including setting the color of various features. However, the color format it uses is HSL (or what seems like it): hue (an RGB hex string) lightness (a floating point value between -100 and 100) saturation (a floating point value between -100 and 100) (from the docs) I ma...

Color Theory: How to convert Munsell HVC to RGB/HSB/HSL

I'm looking at at document that describes the standard colors used in dentistry to describe the color of a tooth. They quote hue, value, chroma values, indicating they are from the 1905 Munsell description of color: The system of colour notation developed by A. H. Munsell in 1905 identifies colour in terms of three attributes: ...