Skip to content

Conversation

@abdultalha0862
Copy link

@abdultalha0862 abdultalha0862 commented Feb 10, 2026

Description

Added documentation for the CSS lch() color function

Issue Solved

#8211

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

Copilot AI review requested due to automatic review settings February 10, 2026 05:58
@CLAassistant
Copy link

CLAassistant commented Feb 10, 2026

CLA assistant check
All committers have signed the CLA.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Codecademy Docs term entry for the CSS lch() color function, including example usage and supporting media assets.

Changes:

  • Added a new lch() term page under CSS Colors terms.
  • Added two media images referenced by the new documentation examples.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 3 comments.

File Description
content/css/concepts/colors/terms/lch/lch.md New documentation entry for lch() with syntax, parameter descriptions, and two examples.
media/css-colors-lch-example-1.png Media asset for Example 1 screenshot (currently appears to be JPEG content with a .png name).
media/css-colors-lch-example-2.png Media asset for Example 2 screenshot (currently appears to be JPEG content with a .png name).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- `lightness`: A percentage value from `0%` to `100%`. Represents the brightness of the color. `0%` is completely black, `100%` is completely white, and `50%` represents the mid-tone.
- `chroma`: A number value (typically `0` to `150` or higher). Represents the colorfulness or intensity of the color. `0` represents a neutral gray with no color, while higher values represent more vivid colors.
- `hue`: A unitless number value representing an angle in the color wheel from `0` to `360`. `0` represents red, `120` represents green, and `240` represents blue.
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hue parameter is described as a unitless number, but CSS lch() accepts an angle (deg, rad, turn, etc.) and also allows values outside 0–360 (they wrap). Updating this description would make the entry more accurate and avoid implying invalid inputs.

Suggested change
- `hue`: A unitless number value representing an angle in the color wheel from `0` to `360`. `0` represents red, `120` represents green, and `240` represents blue.
- `hue`: An angle value on the color wheel. It can be given with units like `deg`, `rad`, or `turn`, or as a unitless number interpreted as degrees. Angles wrap, so they are not limited to `0``360`; for reference, `0deg` represents red, `120deg` represents green, and `240deg` represents blue.

Copilot uses AI. Check for mistakes.
Comment on lines 39 to 51
![lch() Example 1](https://raw.githubusercontent.com/Codecademy/docs/main/media/css-colors-lch-example-1.png)

## Example 2

```css
p {
color: lch(70% 50 260);
}
```

Sets the font color of the `p` element to a light purple color with moderate chroma:

![lch() Example 2](https://raw.githubusercontent.com/Codecademy/docs/main/media/css-colors-lch-example-2.png)
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These images are referenced as .png files, but the added media assets appear to be JPEGs (their headers start with JFIF). Once the media files are re-exported/renamed, please update these URLs so the docs render correctly.

Copilot uses AI. Check for mistakes.
@mamtawardhani mamtawardhani self-assigned this Feb 10, 2026
@abdultalha0862
Copy link
Author

I have implemented all the changes suggested by the Copliot

Ready for Review. Let me know if there are any changes

Updated the description to clarify that LCH is a perceptually uniform color space. Added details about parameters and return value for the lch() function.
Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @abdultalha0862, could you please check the image 3. I feel the image here is incorrect.

@abdultalha0862
Copy link
Author

abdultalha0862 commented Feb 12, 2026

@mamtawardhani I apologise for the wrong file I submitted. I have now uploaded the correct image. Please review it and let me know if any changes are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants