Questions tagged [cielab]

In CIE LAB, LAB stands for Lightness, position between red and green, and position between yellow and blue. It is a colour space designed as more related to human perception than RGB or HSV spaces. It was proposed by the International Commission on Illumination (CIE).

CIE LAB (strictly speaking L*a*b*, as opposed to LAB in Hunter LAB) is a chromatic value colour space and is said to be the most complete colour space specified by the International Commission on Illumination (Commission internationale de l'éclairage - CIE). It describes all the colors visible to the human eye and was created to serve as a device-independent model to be used as a reference.

57 questions
0
votes
0 answers

How do I determine if a color is warm or cool using JavaScript

I'm trying to create two functions isCool(color) and isWarm(color)that return boolean values when passed an RGB color as an argument. These functions should be able to tell if a color is warm or cool based on the channel values of the…
0
votes
1 answer

How do you implement bilinear interpolation of colors using JavaScript?

I need help understanding if there is a better way to do a bilinear interpolation than that I've tried below. I used the Culori library's interpolate() function. I want to bilinearly interpolate colors but I'm not sure if its really correct to first…
0
votes
1 answer

Converting single pixel from RGB to LAB with OpenCV (C++)

I am trying to convert a RGB value to the LAB color space using OpenCV. While doing some research I found someone with a similar goal here and have tried to replicate this approach. After some messing around I was able to get the following code to…
0
votes
0 answers

Calculating complementary hue in CIELAB color space

I need to procedurally generate color palettes consisting of several swatches. For each swatch the luminance is given as input, while chroma and hue are chosen using some algorithm. Since luminance needs to be perceptually fixed I opted for working…
nj16
  • 63
  • 5
0
votes
1 answer

Convert manually CIE LChab values to RGB

I want display sRGB values based on CIE LHab values, i didn't really know the topic aroud color theory but here is my code, i use colour library. Did i miss something? #Use Illuminant d65 d65 = [0.31382,0.33100] # Maximun lightness of 100 lightess…
0
votes
0 answers

converting RGB to xy

I need to obtain the CIE x and y coordinates from the chromaticity diagram. I tried the following: take an RGB point, convert to sRGB, plot it. Separately convert the RGB to xyY, and compare the results. import numpy as np from colour.plotting…
Sanya Pushkar
  • 180
  • 1
  • 16
0
votes
1 answer

How to replicate Android wallpaper theming?

So I want to recreate Android 12 new wallpaper theming on other platforms, but I am not sure how the palette generation works. One site (XDA) says that colors need to be extracted then converted to Lab color space, but what comes next?
vaunnaut
  • 1
  • 1
0
votes
0 answers

Implementing an efficient pair/colour matching algorithm in Java

I'm trying to write an efficient pair matching algorithm for a color matching context Let's say we have an object (representing a CIE-LAB colour): public class labColour { double l; double a; double b; } Now let's say we have…
Ben123
  • 335
  • 2
  • 11
0
votes
2 answers

How to reduce chroma of CIELAB color?

Given a CIELAB color (L* A* B* values), how can the chroma (saturation) be reduced? Chroma can be calculated as follows: Cab= sqrt(a²+b*²) Let's say the output is 72. How do I transform variables a and b to force chroma to be eg. 43?
bart
  • 14,958
  • 21
  • 75
  • 105
0
votes
0 answers

R image of a single color using CIELAB or RGB values

I wish to generate a plot of a single color based on a value of either CIELAB values or RGB values in R. I have seen examples of displaying colors in…
0
votes
0 answers

Automatically calculate delta e of different LAB values

from colormath.color_diff import delta_e_cie2000 from colormath.color_objects import LabColor color1 = LabColor(lab_l=80.4569, lab_a=2.1034, lab_b=53.0929) color2 = LabColor(lab_l=88.8133, lab_a=-0.9955, lab_b=25.3040) color3 =…
0
votes
1 answer

Conversion RGB into LAB for multiple values

I wrote a code that gives me the average RGB value of an image. Now I want besides the RGB value, also a LAB value. I found a code to do the conversion, but when I run the code, it only gives me the last value. So with this code I receive the…
0
votes
1 answer

How to convert CIE xy value to gray scale value

Is there a way CIE chromaticity coordinates to gray scale value (0 to 255)? Any existing implementation in ImageJ, R or Python? Or formula? Here is the table taken from here.
neversaint
  • 60,904
  • 137
  • 310
  • 477
0
votes
2 answers

Converting single value colors to LAB using python OpenCV

I have an numpy array containing a single pixel/color in floating point RGB. I need to convert this value to LAB, for which I am trying the following: color = cv2.cvtColor(color.reshape((1,1,3)), cv2.COLOR_RGB2LAB).reshape((3)) Where color…
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
1 answer

LAB to XYZ and XYZ to RGB color space conversion algorithm

I tried to convert CIE-LAB color space to RGB color space. But there is a mistake. input LAB values = (46.41,-39.24,33.51) received result XYZ values =(-2,641482,15,57358,-5,368798) received result RGB vaues = (-791,4557,135,8615,-271,5485) XYZ…
erncncbk
  • 59
  • 1
  • 7