Questions tagged [hsl]

HSV is cylindrical color model that determines colors by hue (0°-360°), saturation (color intensity) and lightness (from black over the color to white).

The HSL model describes colors in terms of hue, saturation, and lightness (also called luminance). (Note: the definition of saturation in HSL is substantially different from HSV) The model has two prominent properties:

  • The transition from black to a hue to white is symmetric and is controlled solely by increasing lightness

    • Shading and tinting are controlled by a single value, lightness
  • Decreasing saturation transitions to a shade of gray dependent on the lightness, thus keeping the overall intensity relatively constant

    • Tones are controlled by a single value, saturation

The properties mentioned above have led to the wide use of HSL, in particular, in the CSS3 color model. As in HSV, hue corresponds directly to the concept of hue in the Color Basics section. The advantages of using hue are

  • The relationship between tones around the color circle is easily identified
  • Shades, tints, and tones can be generated easily without affecting the hue

http://xahlee.info/js/i/HSL_color_model.png

Lightness combines the concepts of shading and tinting from the Color Basics section. Assuming full saturation, lightness is neutral at the midpoint value, for example 50%, and the hue displays unaltered. As lightness decreases below the midpoint, it has the effect of shading. Zero lightness produces black. As lightness increases above 50%, it has the effect of tinting, and full lightness produces white.

At zero saturation, lightness controls the resulting shade of gray. A value of zero still produces black, and full lightness still produces white. The midpoint value results in the "middle" shade of gray, with an RGB value of (128,128,128).

As saturation decreases, it produces tones of the reference hue that converge on a shade of gray that is determined by the lightness. This keeps the total intensity relatively constant.


Note that the physical nature of additive color prevents the scheme from working exactly except for hues halfway between the primary and secondary hues. However, the total intensity of the tones resulting from decreasing saturation are much closer than tinting alone, as in HSV.

265 questions
0
votes
1 answer

How to compile HSL for IPOPT (after IPOPT)

I use MINGW64 to compile HSL (https://www.hsl.rl.ac.uk/ipopt/) following the redme. However, I end up with an error 2 (Makefile:753). The critical command is gfortran -shared .libs/libcoinhsl-0.dll.def common/.libs/deps90.o common/.libs/deps.o…
Thomas
  • 15
  • 4
0
votes
0 answers

Color brightness changes (RGB, HSV, ITU BT.709)

The I2TU BT.709 standard calculates relative - apparent - luminance. The HSV space, in turn, provides the ability to change the absolute value of the brightness. The question arose of how to relate these values. Let's say in HSV space the brightness…
Marionette
  • 101
  • 1
0
votes
1 answer

why particle System number impact the color in three.js

look I am trying to show flame in particle system .But when i change the particle num,the color get changed.1 particle///// 100 particles as you can see ,the color in 100 particles are changed to yellow in the beside.this is why? i set the color as…
sisi
  • 1
0
votes
2 answers

Unable to find a suitable output format for 'ffmpeg' - ffmpeg: Invalid argument

I am trying to work through a tutorial I found online that converts an RTSP URL to a HSL stream. Upon executing the command on ubuntu 20.04, I get the following error: "[NULL @ 0x55985b9bab80] Unable to find a suitable output format for…
Alvydas Juodikis
  • 163
  • 1
  • 3
  • 15
0
votes
2 answers

style div with background color in hsl with js calculated luminescence value based on rating

I belong to a chess club with players who have ratings ranging from 0 to 2500 I want to style each screen tuple with an hsl value similar to: hsl(189, 100%, XX%); // where XX = player rating / 25 // GET TUPLE DIV ID: var pirate =…
verlager
  • 794
  • 5
  • 25
  • 43
0
votes
0 answers

CSS - Why you can't use decimal number to represent percentage for Saturation or Lightness in HSL?

I can use either 50% or 0.5 to represent opacity, and they all works hsla(x, x, x, 0.5) or hsla (x, x, x, 50%) but not for Saturation and Lightness hsla(x, 50%, x, x) would work, hsla (x, 0.5, x, x) won't work Why? Is using decimal numbers conflicts…
l1player
  • 1
  • 1
0
votes
2 answers

HSL to RGB converter issue

This converter assumes H, S, and L are contained in the set [0, 1]. But I want H to be between [0, 359] (0 and 359 included) and S & L between [0, 100] (0 and 100 included) and I don't know how to do it (in Java as well). I took this converter from…
ericmp
  • 1,163
  • 4
  • 18
0
votes
0 answers

how to calculate css custom variables? calc(percentage * percentage)

I tried to calculate some css variables. But I've a problem with calc(percentage * percentage). It seem a problem with percentage multiplied by percentage. --test: 30%; --test2: 50%; background: hsl( 10deg, 40%, calc( 50% *…
Heyyy Marco
  • 633
  • 1
  • 12
  • 22
0
votes
1 answer

Problem determining Color Saturation

I am writing a tool that will attempt to determine which of the known colors is "closest" to some user-chosen color (from the full RGB gamut). I am noticing that the values returned by Microsoft's GetHue and GetBrightness appear to have the same…
Gus
  • 1,383
  • 2
  • 12
  • 23
0
votes
1 answer

HSL color picker: background color not changing

I am creating an HSL color picker here, and so far I have only done hue and saturation. I am trying to change the background color of the body when the value of one of the
user14626291
0
votes
1 answer

Confusion with red eye detection

First of all, I am not asking anyone to do my homework. I would like to get an explanation or clarification about my difficulties in understanding the following question. I just finished my image processing test, but one question that I could not…
0
votes
1 answer

PHP: Hex to HSL conversion not working for certain colours

Below is the function I am using to convert hex colour values to HSL in PHP. This works almost all of the time, however, there are certain colours that produce incorrect values and I cannot figure out why. function hexToHsl($hex) { $red =…
Kieran
  • 46
  • 3
0
votes
1 answer

How to convert HSL to RBG in Lua

I would like to convert a HSL value into an RBG so that i can easily generate random colours in Love2D, however i am having trouble finding how to do this. I did check wikipedia but really didn't understand anything, and i was browsing stack…
Dot32
  • 1
0
votes
1 answer

Halcon - Subtract regions

I'd need to subtract one region from another. I found how to combine two, but cannot figure out how to subtract one from another.. What I want to do is this: I have a Image splitted in its H L S channels. I want the Region of the L Channel between…
sharkyenergy
  • 3,842
  • 10
  • 46
  • 97
0
votes
1 answer

"MP3 file format not valid. Zero duration. Seek will not function properly:" Error streaming big mp3 files with HLS

I'm experiencing the following error trying to stream a big MP3 file (2.6 GB) from a VOD application using HLS (wowza version is 4.1.2) ERROR server comment 2020-06-11 17:21:00 - - - - - 59.9 - - - - - - - open : java.lang.Exception: MP3 file…
Laura
  • 181
  • 1
  • 16