refactor(treewide): cleanup and use rgbify mixin (#1511)

This commit is contained in:
uncenter authored and GitHub committed 2024-12-24 16:45:33 -05:00
1 parent a53832420b
commit 7acf913ebc
27 files changed
+76 -72

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
## Obtaining RGB values
You can use the following snippet to get the raw RGB values from a color.
```less
#rgbify(@color) {
@rgb: red(@color), green(@color), blue(@color);
}
```
```less
--ctp-base: #rgbify(@base) []; // -> 30, 30, 46
```
## Obtaining HSL values
You can use the following snippet to get the raw HSL values from a color.
```less
#hslify(@color) {
@raw: e(
%("%s, %s%, %s%", hue(@color), saturation(@color), lightness(@color))
);
}
```
```less
--ctp-base: #hslify(@base) []; // -> 240, 21.052631578947366%, 14.901960784313726%
```