Make it easier for the user to change HUE, Saturation, Lightness / Brightness by adding support for HSL, HSB/HSV.
Changes Proposed
Added support for HSL, HSB, HSV color formats with the syntax hsl(180,50%,50%), hsb(180,50%,50%) and hsv(180,50%,50%). Both versions with ‘%’ and without are supported.
Added support for RGB color format with the syntax rgb(255,255,255).
Added support for Hex color format with the syntax #FFFFFF.
Checklist
[x] I have read the contribution guidelines and code of conduct.
[x] I have tested the changes locally and they are working as expected.
[x] I have added appropriate comments and documentation for the code changes.
[x] My code follows the coding style and standards of this project.
[x] I have rebased my branch on the latest main (or master) branch.
[x] All tests (if applicable) have passed successfully.
[x] I have run linters and fixed any issues.
[x] I have checked for any potential security issues or vulnerabilities.
Screenshots:
Additional Notes
HSB (Hue, Saturation, Brightness) and HSL (Hue, Saturation, Lightness) color models are often considered more intuitive and user-friendly than RGB. For instance, if you want to lighten a color, you can simply increase the lightness value in HSL. In RGB or HEX, you would need to adjust three values simultaneously.
This also allows to create more harmonious callouts. For example, you can create a monochromatic color scheme by keeping the hue constant and varying the saturation and brightness/lightness.
BEGIN_COMMIT_OVERRIDE
feat: Adds support for HSL, HSB, HSV, HEX and RGB colors in Admonition definitions (thanks @xRyul )
END_COMMIT_OVERRIDE
Pull Request Description
Make it easier for the user to change HUE, Saturation, Lightness / Brightness by adding support for HSL, HSB/HSV.
Changes Proposed
Checklist
Screenshots:
Additional Notes
HSB (Hue, Saturation, Brightness) and HSL (Hue, Saturation, Lightness) color models are often considered more intuitive and user-friendly than RGB. For instance, if you want to lighten a color, you can simply increase the lightness value in HSL. In RGB or HEX, you would need to adjust three values simultaneously.
This also allows to create more harmonious callouts. For example, you can create a monochromatic color scheme by keeping the hue constant and varying the saturation and brightness/lightness.
BEGIN_COMMIT_OVERRIDE feat: Adds support for HSL, HSB, HSV, HEX and RGB colors in Admonition definitions (thanks @xRyul ) END_COMMIT_OVERRIDE