CSS lch() ফাংশন

নির্দিষ্টকরণ ও ব্যবহার

CSS-র lch() ফাংশন সমূহকে এলচি (আলোকমান-এক্সট্রিমাসি-হিউমানসি) রঙ স্পেসে রঙ নির্দিষ্ট করে।

ইনস্ট্যান্স

বিভিন্ন lch() রঙ:

#p1 {background-color:lch(10% 100 130 / 0.5);}
#p2 {background-color:lch(40% 100 130);}
#p3 {background-color:lch(90% 100 130 / 20%);}
#p4 {background-color:lch(10% 160 200);}
#p4 {background-color:lch(10% 160 200);}
#p5 {background-color:lch(40% 160 200);}
#p6 {background-color:lch(90% 160 200 / 0.3);}
#p7 {background-color:lch(10% 130 70 / 0.5);}
#p8 {background-color:lch(40% 130 70);}

#p9 {background-color:lch(90% 130 70);}

Try It Yourself

CSS Syntax

Absolute Value SyntaxThis is the original color on which the relative color is based. C H / Alch(from
) Value
This is the original color on which the relative color is based.

Required. Defines the brightness of the color, which can be a number or percentage between 0 and 100.

0 (or 0%) represents black, 100 (or 100%) represents white.

You can also use none (equivalent to 0%).

C

lch(

Required. Defines the chroma (quantity of color), which can be a number or percentage.

You can also use none (equivalent to 0%).

H

Required. Defines the hue angle of the color, which can be a number or an angle value.

You can also use none (equivalent to 0deg).

/ A

Optional. Represents the opacity channel value of the color (0% or 0 represents completely transparent, 100% or 100 represents completely opaque).

You can also use none (representing no transparency channel).

Default is 100%.

The minimum value is 0 (or 0%). The maximum value has no upper limit (but actually does not exceed 230). 100% is equal to 150.

Relative Value Syntax from This is the original color on which the relative color is based. C H / Alch(from
) Value
Description from

color

Starts with the keyword from, followed by the color value representing the original color.

This is the original color on which the relative color is based.

Required. Defines the brightness of the color, which can be a number or percentage between 0 and 100.

0 (or 0%) represents black, 100 (or 100%) represents white.

You can also use none (equivalent to 0%).

C

Required. Defines a number or percentage between -125 and 125 or between -100% and 100%.

Defines the distance along the a-axis of the color, representing the red-green degree of the color.

You can also use none (equivalent to 0%).

H

Required. Defines the hue angle of the color, which can be a number or an angle value.

You can also use none (equivalent to 0deg).

/ A

Optional. Represents the opacity channel value of the color (0% or 0 represents completely transparent, 100% or 100 represents completely opaque).

You can also use none (representing no transparency channel).

Default is 100%.

Technical Details

Version: CSS Color Module Level 4

Browser Support

The numbers in the table represent the first browser version to fully support this function.

Chrome Edge Firefox Safari Opera
lch()
111 111 113 15 97
Mixing Numbers and Percentages in Parameters
116 116 113 16.2 102

Related Pages

উল্লেখCSS রঙ

উল্লেখCSS hsl() Function

উল্লেখCSS hwb() ফাংশন

উল্লেখCSS lab() ফাংশন

উল্লেখCSS oklab() ফাংশন

উল্লেখCSS oklch() ফাংশন