Skip to content

relative color syntax #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/css-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ body:
- PostCSS Progressive Custom Properties
- PostCSS Pseudo Class Any Link
- PostCSS Rebeccapurple
- PostCSS Relative Color Syntax
- PostCSS Replace Overflow Wrap
- PostCSS Scope Pseudo Class
- PostCSS Selector Not
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/plugin-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ body:
- PostCSS Progressive Custom Properties
- PostCSS Pseudo Class Any Link
- PostCSS Rebeccapurple
- PostCSS Relative Color Syntax
- PostCSS Replace Overflow Wrap
- PostCSS Scope Pseudo Class
- PostCSS Selector Not
Expand Down
10 changes: 7 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,18 @@
- plugins/postcss-pseudo-class-any-link/**
- experimental/postcss-pseudo-class-any-link/**

"plugins/postcss-scope-pseudo-class":
- plugins/postcss-scope-pseudo-class/**
- experimental/postcss-scope-pseudo-class/**
"plugins/postcss-relative-color-syntax":
- plugins/postcss-relative-color-syntax/**
- experimental/postcss-relative-color-syntax/**

"plugins/postcss-replace-overflow-wrap":
- plugins/postcss-replace-overflow-wrap/**
- experimental/postcss-replace-overflow-wrap/**

"plugins/postcss-scope-pseudo-class":
- plugins/postcss-scope-pseudo-class/**
- experimental/postcss-scope-pseudo-class/**

"plugins/postcss-selector-not":
- plugins/postcss-selector-not/**
- experimental/postcss-selector-not/**
Expand Down
97 changes: 75 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/color-helpers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changes to Color Helpers

### Unreleased (minor)

- Fix gamut mapping
- Fix `XYZ_D50_to_ProPhoto`
- Export `sRGB_to_HWB`

### 2.0.0 (March 25, 2023)

- Removed certain implementation specific helpers. Keeping this package more focussed on general purpose color transformations.
Expand Down
1 change: 1 addition & 0 deletions packages/color-helpers/dist/conversions/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export * from './oklab-to-oklch';
export * from './oklab-to-xyz';
export * from './oklch-to-oklab';
export * from './srgb-to-hsl';
export * from './srgb-to-hwb';
export * from './srgb-to-luminance';
export * from './xyz-to-lab';
export * from './xyz-to-lin-2020';
Expand Down
11 changes: 11 additions & 0 deletions packages/color-helpers/dist/conversions/srgb-to-hwb.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Color } from 'types/color';
/**
* Convert an array of gamma-corrected sRGB values in the 0.0 to 1.0 range to HWB.
*
* @param {Color} RGB [r, g, b]
* - Red component 0..1
* - Green component 0..1
* - Blue component 0..1
* @return {number[]} Array of HWB values
*/
export declare function sRGB_to_HWB(RGB: Color): Color;
Loading